From 7e02cdb46c73ab8a308335e83302ef58ff7d4126 Mon Sep 17 00:00:00 2001 From: Mike McLean Date: Mon, 15 Oct 2018 13:02:06 -0400 Subject: [PATCH] only pass new incl_blocked call opt if it is explicitly needed Older servers don't have the opt and will error if they see it Fixes: #1126 --- cli/koji_cli/commands.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/cli/koji_cli/commands.py b/cli/koji_cli/commands.py index 5b89b0c8..df4600d7 100644 --- a/cli/koji_cli/commands.py +++ b/cli/koji_cli/commands.py @@ -2584,7 +2584,9 @@ def anon_handle_list_groups(goptions, session, args): if len(args) < 1 or len(args) > 2: parser.error(_("Incorrect number of arguments")) assert False # pragma: no cover - opts = {'incl_blocked': options.incl_blocked} + opts = {} + if options.incl_blocked: + opts['incl_blocked'] = True activate_session(session, goptions) event = koji.util.eventFromOpts(session, options) if event: @@ -5107,7 +5109,10 @@ def anon_handle_show_groups(goptions, session, args): parser.error(_("--show-blocked doesn't make sense for comps/spec output")) activate_session(session, goptions) tag = args[0] - groups = session.getTagGroups(tag, incl_blocked=options.incl_blocked) + callopts = {} + if options.incl_blocked: + callopts['incl_blocked'] = True + groups = session.getTagGroups(tag, **callopts) if options.comps: print(koji.generate_comps(groups, expand_groups=options.expand)) elif options.spec: