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.
This commit is contained in:
Ken Dreyer 2020-12-18 15:46:39 -07:00 committed by Tomas Kopecek
parent ed04738b58
commit 8d0b4bc618

View file

@ -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