From 88f40ac0add14cc9e7c106c5e2e9ec3d6f73df6e Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Sat, 17 Jun 2017 03:33:38 +0000 Subject: Provide a better way to avoid instantiating some components --- src/mailman/bin/mailman.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/mailman/bin/mailman.py') diff --git a/src/mailman/bin/mailman.py b/src/mailman/bin/mailman.py index eea3603a8..62066175e 100644 --- a/src/mailman/bin/mailman.py +++ b/src/mailman/bin/mailman.py @@ -28,7 +28,6 @@ from mailman.interfaces.command import ICLISubCommand from mailman.utilities.modules import find_components from mailman.version import MAILMAN_VERSION_FULL from public import public -from zope.interface.verify import verifyObject # --help should display the subcommands by alphabetical order, except that @@ -76,9 +75,7 @@ def main(): # the plugins. Punt on this for now. subparser = parser.add_subparsers(title='Commands') subcommands = [] - for command_class in find_components('mailman.commands', ICLISubCommand): - command = command_class() - verifyObject(ICLISubCommand, command) + for command in find_components('mailman.commands', ICLISubCommand): subcommands.append(command) subcommands.sort(key=cmp_to_key(_help_sorter)) for command in subcommands: -- cgit v1.2.3-70-g09d2