From d765fb012fcc068b7e7803a149e117b1cc1a2589 Mon Sep 17 00:00:00 2001 From: David Soto Date: Wed, 23 Jan 2013 20:07:53 +0100 Subject: usage help improved --- src/mailman/commands/cli_mailmanconf.py | 11 +++++++++-- src/mailman/commands/tests/test_mailmanconf.py | 3 ++- 2 files changed, 11 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/mailman/commands/cli_mailmanconf.py b/src/mailman/commands/cli_mailmanconf.py index 1da9095fc..f29781473 100644 --- a/src/mailman/commands/cli_mailmanconf.py +++ b/src/mailman/commands/cli_mailmanconf.py @@ -52,10 +52,17 @@ class Mailmanconf: used.""")) command_parser.add_argument( '-s', '--section', - action='store', help=_("Section to use for the lookup (optional).")) + action='store', help=_("""\ + Section to use for the lookup. If no key is given, + all the key-value pairs of the given section will be displayed. + """)) command_parser.add_argument( '-k', '--key', - action='store', help=_("Key to use for the lookup (optional).")) + action='store', help=_("""\ + Key to use for the lookup. If no section is given, + all the key-values pair from any section matching the given key + will be displayed. + """)) def _get_value(self, section, key): return getattr(getattr(config, section), key) diff --git a/src/mailman/commands/tests/test_mailmanconf.py b/src/mailman/commands/tests/test_mailmanconf.py index 092c8a8d6..dbea2c362 100644 --- a/src/mailman/commands/tests/test_mailmanconf.py +++ b/src/mailman/commands/tests/test_mailmanconf.py @@ -72,4 +72,5 @@ class TestStart(unittest.TestCase): except SystemExit: pass self.assertEqual(self.command.parser.message, - 'Section mailman: No such key: thiskeydoesnotexist') \ No newline at end of file + 'Section mailman: No such key: thiskeydoesnotexist') + \ No newline at end of file -- cgit v1.3.1