Commit d765fb01 authored by David Soto's avatar David Soto

usage help improved

parent 44c03cb9
......@@ -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)
......
......@@ -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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment