#2615 cli: catch koji.ParameterError in list_task_output_all_volumes
Merged a year ago by tkopecek. Opened a year ago by ktdreyer.
ktdreyer/koji catch-parameter-error  into  master

file modified
+1 -1
@@ -450,7 +450,7 @@ 

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

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.

Metadata Update from @tkopecek:
- Pull-request tagged with: testing-ready

a year ago

Metadata Update from @julian8628:
- Pull-request untagged with: testing-ready
- Pull-request tagged with: no_qe

a year ago

Commit 8b53dc7 fixes this pull-request

Pull-Request has been merged by tkopecek

a year ago