diff options
| author | Barry Warsaw | 2017-06-17 03:33:38 +0000 |
|---|---|---|
| committer | Barry Warsaw | 2017-06-17 03:33:38 +0000 |
| commit | 88f40ac0add14cc9e7c106c5e2e9ec3d6f73df6e (patch) | |
| tree | 9bc9cef4a696639654185709c1143924b1d41f43 /src/mailman/app/commands.py | |
| parent | 4fdad6f9c8a9487a6f2c8462be734cd97aaf4d94 (diff) | |
| download | mailman-88f40ac0add14cc9e7c106c5e2e9ec3d6f73df6e.tar.gz mailman-88f40ac0add14cc9e7c106c5e2e9ec3d6f73df6e.tar.zst mailman-88f40ac0add14cc9e7c106c5e2e9ec3d6f73df6e.zip | |
Diffstat (limited to 'src/mailman/app/commands.py')
| -rw-r--r-- | src/mailman/app/commands.py | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/mailman/app/commands.py b/src/mailman/app/commands.py index 9983a25e5..7cf3bc4c5 100644 --- a/src/mailman/app/commands.py +++ b/src/mailman/app/commands.py @@ -19,18 +19,11 @@ from mailman.config import config from mailman.interfaces.command import IEmailCommand -from mailman.utilities.modules import find_components +from mailman.utilities.modules import add_components from public import public -from zope.interface.verify import verifyObject @public def initialize(): """Initialize the email commands.""" - for command_class in find_components('mailman.commands', IEmailCommand): - command = command_class() - verifyObject(IEmailCommand, command) - assert command_class.name not in config.commands, ( - 'Duplicate email command "{}" found in {}'.format( - command_class.name, command_class.__module__)) - config.commands[command_class.name] = command_class() + add_components('mailman.commands', IEmailCommand, config.commands) |
