catch the exception on old hub
This commit is contained in:
parent
3f57163c3f
commit
23c1ee9f44
1 changed files with 6 additions and 1 deletions
|
|
@ -3106,7 +3106,12 @@ def anon_handle_list_builds(goptions, session, args):
|
|||
else:
|
||||
# Check filter exists
|
||||
if any(opts):
|
||||
data = session.listBuilds(**opts)
|
||||
try:
|
||||
data = session.listBuilds(**opts)
|
||||
except koji.ParameterError as e:
|
||||
if e.args[0].endswith("'pattern'"):
|
||||
parser.error(_("The hub doesn't support the 'pattern' argument, please try"
|
||||
" filtering the result on your local instead."))
|
||||
else:
|
||||
parser.error(_("Filter must be provided for list"))
|
||||
if not options.sort_key:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue