diff options
| author | Barry Warsaw | 2017-06-17 03:33:39 +0000 |
|---|---|---|
| committer | Barry Warsaw | 2017-06-17 03:33:39 +0000 |
| commit | 66559bacf1dbfa166c2d4c2596ea96c7909bb43c (patch) | |
| tree | 9bc9cef4a696639654185709c1143924b1d41f43 /src/mailman/core/pipelines.py | |
| parent | 4fdad6f9c8a9487a6f2c8462be734cd97aaf4d94 (diff) | |
| parent | 88f40ac0add14cc9e7c106c5e2e9ec3d6f73df6e (diff) | |
| download | mailman-66559bacf1dbfa166c2d4c2596ea96c7909bb43c.tar.gz mailman-66559bacf1dbfa166c2d4c2596ea96c7909bb43c.tar.zst mailman-66559bacf1dbfa166c2d4c2596ea96c7909bb43c.zip | |
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() |
