From 82affb2668ec6fa2d04fe7965a4c317eb13d8fce Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Sun, 16 Aug 2009 09:32:10 -0400 Subject: Refactor the subcommands so that the infrastructure does more of the menial tasks. This also let's the bin/mailman command sort its subcommands for help printing. Add the outline of a 'members' subcommand. --- src/mailman/commands/cli_help.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/mailman/commands/cli_help.py') diff --git a/src/mailman/commands/cli_help.py b/src/mailman/commands/cli_help.py index 4cffaaf87..8b1b7e307 100644 --- a/src/mailman/commands/cli_help.py +++ b/src/mailman/commands/cli_help.py @@ -32,16 +32,16 @@ from mailman.interfaces.command import ICLISubCommand class Help: - """The `help` subcommand.""" + # Lowercase, to match argparse's default --help text. + """show this help message and exit""" implements(ICLISubCommand) - def add(self, parser, subparser): + name = 'help' + + def add(self, parser, command_parser): """See `ICLISubCommand`.""" self.parser = parser - help_parser = subparser.add_parser( - 'help', help=('show this help message and exit')) - help_parser.set_defaults(func=self.process) def process(self, args): """See `ICLISubCommand`.""" -- cgit v1.2.3-70-g09d2