diff options
| author | Barry Warsaw | 2012-04-25 22:08:22 -0400 |
|---|---|---|
| committer | Barry Warsaw | 2012-04-25 22:08:22 -0400 |
| commit | 658fad42b04420962e6ac478247411ee77483d93 (patch) | |
| tree | db16a22376b7191910bf674304c847850169144f /src/mailman/chains/base.py | |
| parent | 4488631dff02731ff03f2fef01ee27bbd944812b (diff) | |
| download | mailman-658fad42b04420962e6ac478247411ee77483d93.tar.gz mailman-658fad42b04420962e6ac478247411ee77483d93.tar.zst mailman-658fad42b04420962e6ac478247411ee77483d93.zip | |
Diffstat (limited to 'src/mailman/chains/base.py')
| -rw-r--r-- | src/mailman/chains/base.py | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/mailman/chains/base.py b/src/mailman/chains/base.py index 8a2e87ee2..b75d66989 100644 --- a/src/mailman/chains/base.py +++ b/src/mailman/chains/base.py @@ -17,7 +17,7 @@ """Base class for terminal chains.""" -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, print_function, unicode_literals __metaclass__ = type __all__ = [ @@ -28,7 +28,7 @@ __all__ = [ ] -from zope.interface import implements +from zope.interface import implementer from mailman.config import config from mailman.interfaces.chain import ( @@ -36,9 +36,9 @@ from mailman.interfaces.chain import ( +@implementer(IChainLink) class Link: """A chain link.""" - implements(IChainLink) def __init__(self, rule, action=None, chain=None, function=None): self.rule = rule @@ -61,13 +61,12 @@ class Link: +@implementer(IChain, IChainIterator) class TerminalChainBase: """A base chain that always matches and executes a method. The method is called '_process()' and must be provided by the subclass. """ - implements(IChain, IChainIterator) - def _process(self, mlist, msg, msgdata): """Process the message for the given mailing list. @@ -93,9 +92,9 @@ class TerminalChainBase: +@implementer(IMutableChain) class Chain: """Generic chain base class.""" - implements(IMutableChain) def __init__(self, name, description): assert name not in config.chains, ( @@ -125,11 +124,10 @@ class Chain: +@implementer(IChainIterator) class ChainIterator: """Generic chain iterator.""" - implements(IChainIterator) - def __init__(self, chain): self._chain = chain |
