diff options
Diffstat (limited to 'src/mailman/core/pipelines.py')
| -rw-r--r-- | src/mailman/core/pipelines.py | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/mailman/core/pipelines.py b/src/mailman/core/pipelines.py index 07780dfeb..15e23a022 100644 --- a/src/mailman/core/pipelines.py +++ b/src/mailman/core/pipelines.py @@ -25,10 +25,9 @@ from mailman.core.i18n import _ from mailman.interfaces.handler import IHandler from mailman.interfaces.pipeline import ( DiscardMessage, IPipeline, RejectMessage) -from mailman.utilities.modules import find_components +from mailman.utilities.modules import add_components from public import public from zope.interface import implementer -from zope.interface.verify import verifyObject dlog = logging.getLogger('mailman.debug') @@ -139,13 +138,7 @@ class VirginPipeline(BasePipeline): def initialize(): """Initialize the pipelines.""" # Find all handlers in the registered plugins. - for handler_class in find_components('mailman.handlers', IHandler): - handler = handler_class() - verifyObject(IHandler, handler) - assert handler.name not in config.handlers, ( - 'Duplicate handler "{}" found in {}'.format( - handler.name, handler_class)) - config.handlers[handler.name] = handler + add_components('mailman.handlers', IHandler, config.handlers) # Set up some pipelines. for pipeline_class in (OwnerPipeline, PostingPipeline, VirginPipeline): pipeline = pipeline_class() |
