From b6bdad7d508e813eef30c367286fc1af6694fa07 Mon Sep 17 00:00:00 2001 From: Tomas Kopecek Date: Mar 05 2021 14:36:12 +0000 Subject: cli: fix help message formatting Related: https://pagure.io/koji/issue/2718 --- diff --git a/cli/koji_cli/commands.py b/cli/koji_cli/commands.py index 358d772..8330886 100644 --- a/cli/koji_cli/commands.py +++ b/cli/koji_cli/commands.py @@ -871,9 +871,10 @@ def handle_resubmit(goptions, session, args): def handle_call(goptions, session, args): "Execute an arbitrary XML-RPC call" usage = _("""\ - usage: %prog call [options] [ ...]") + usage: %prog call [options] [ ...] Note, that you can use global option --noauth for anonymous calls here""") + usage = textwrap.dedent(usage) parser = OptionParser(usage=get_usage_str(usage)) parser.add_option("--python", action="store_true", help=_("Use python syntax for values")) parser.add_option("--kwargs", diff --git a/tests/test_cli/test_call.py b/tests/test_cli/test_call.py index b8d191f..8d430b5 100644 --- a/tests/test_cli/test_call.py +++ b/tests/test_cli/test_call.py @@ -15,6 +15,8 @@ class TestCall(utils.CliTestCase): def setUp(self): self.error_format = """Usage: %s call [options] [ ...] + +Note, that you can use global option --noauth for anonymous calls here (Specify the --help global option for a list of other help options) %s: error: {message} @@ -130,6 +132,8 @@ class TestCall(utils.CliTestCase): self.assert_help( handle_call, """Usage: %s call [options] [ ...] + +Note, that you can use global option --noauth for anonymous calls here (Specify the --help global option for a list of other help options) Options: