From 242fbd00afb299f6e5ce823330ce560d8a0bbd3f Mon Sep 17 00:00:00 2001 From: Tomas Kopecek Date: Mon, 18 Nov 2019 12:43:37 +0100 Subject: [PATCH] some list-pkgs options work only in combinations Fixes: https://pagure.io/koji/issue/1779 --- cli/koji_cli/commands.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cli/koji_cli/commands.py b/cli/koji_cli/commands.py index 3ac98c42..44c3888c 100644 --- a/cli/koji_cli/commands.py +++ b/cli/koji_cli/commands.py @@ -2977,6 +2977,13 @@ def anon_handle_list_pkgs(goptions, session, args): opts['event'] = event['id'] event['timestr'] = time.asctime(time.localtime(event['ts'])) print("Querying at event %(id)i (%(timestr)s)" % event) + + if not opts['tagID'] and not opts['userID'] and not opts['pkgID']: + if opts['event']: + parser.error("--event and --ts makes sense only with --tag, --owner or --package") + if opts['show_blocked']: + parser.error("--show-blocked makes sense only with --tag, --owner or --package") + data = session.listPackages(**opts) if not data: print("(no matching packages)")