From 31fd78d5439a11509d2f53b5a4c3c609b0786cbe Mon Sep 17 00:00:00 2001 From: Tomas Kopecek Date: Jan 16 2020 12:53:13 +0000 Subject: fix usage message for add-pkg Fixes: https://pagure.io/koji/issue/1212 --- diff --git a/cli/koji_cli/commands.py b/cli/koji_cli/commands.py index 3b398b5..25e1c95 100644 --- a/cli/koji_cli/commands.py +++ b/cli/koji_cli/commands.py @@ -320,7 +320,7 @@ def handle_rename_channel(goptions, session, args): def handle_add_pkg(goptions, session, args): "[admin] Add a package to the listing for tag" - usage = _("usage: %prog add-pkg [options] [ ...]") + usage = _("usage: %prog add-pkg [options] --owner [ ...]") parser = OptionParser(usage=get_usage_str(usage)) parser.add_option("--force", action='store_true', help=_("Override blocks if necessary")) parser.add_option("--owner", help=_("Specify owner")) diff --git a/tests/test_cli/test_add_pkg.py b/tests/test_cli/test_add_pkg.py index 2a3a823..20bca2a 100644 --- a/tests/test_cli/test_add_pkg.py +++ b/tests/test_cli/test_add_pkg.py @@ -202,7 +202,7 @@ class TestAddPkg(unittest.TestCase): actual_stdout = stdout.getvalue() actual_stderr = stderr.getvalue() expected_stdout = '' - expected_stderr = """Usage: %s add-pkg [options] [ ...] + expected_stderr = """Usage: %s add-pkg [options] --owner [ ...] (Specify the --help global option for a list of other help options) %s: error: Please specify an owner for the package(s) @@ -239,7 +239,7 @@ class TestAddPkg(unittest.TestCase): actual_stdout = stdout.getvalue() actual_stderr = stderr.getvalue() expected_stdout = '' - expected_stderr = """Usage: %s add-pkg [options] [ ...] + expected_stderr = """Usage: %s add-pkg [options] --owner [ ...] (Specify the --help global option for a list of other help options) %s: error: Please specify a tag and at least one package