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_info.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src/mailman/commands/cli_info.py') diff --git a/src/mailman/commands/cli_info.py b/src/mailman/commands/cli_info.py index 0595c32fa..a710e3bd7 100644 --- a/src/mailman/commands/cli_info.py +++ b/src/mailman/commands/cli_info.py @@ -37,16 +37,15 @@ from mailman.version import MAILMAN_VERSION_FULL class Info: - """The `info` subcommand.""" + """Information about this Mailman instance.""" implements(ICLISubCommand) - def add(self, parser, subparser): + name = 'info' + + def add(self, parser, command_parser): """See `ICLISubCommand`.""" - info_parser = subparser.add_parser( - 'info', help=_('Information about this Mailman instance.')) - info_parser.set_defaults(func=self.process) - info_parser.add_argument( + command_parser.add_argument( '-o', '--output', action='store', help=_("""\ File to send the output to. If not given, standard output is -- cgit v1.2.3-70-g09d2