From 8d0b4bc618cb59730fe4029ae19e9f40e108a97c Mon Sep 17 00:00:00 2001 From: Ken Dreyer Date: Fri, 18 Dec 2020 15:46:39 -0700 Subject: [PATCH] cli: catch koji.ParameterError in list_task_output_all_volumes When we send an RPC with a parameter that the hub does not understand, we get a koji.ParameterError. Update list_task_output_all_volumes() to catch the specific error we expect here. The purpose of this change is to make the code easier to understand. --- cli/koji_cli/lib.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/koji_cli/lib.py b/cli/koji_cli/lib.py index 0540ffb7..4383d2ae 100644 --- a/cli/koji_cli/lib.py +++ b/cli/koji_cli/lib.py @@ -454,7 +454,7 @@ def list_task_output_all_volumes(session, task_id): """List task output with all volumes, or fake it""" try: return session.listTaskOutput(task_id, all_volumes=True) - except koji.GenericError as e: + except koji.ParameterError as e: if 'got an unexpected keyword argument' not in str(e): raise # otherwise leave off the option and fake it