diff options
Diffstat (limited to 'Mailman/chains/base.py')
| -rw-r--r-- | Mailman/chains/base.py | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/Mailman/chains/base.py b/Mailman/chains/base.py index 30b66b1cf..16aa63176 100644 --- a/Mailman/chains/base.py +++ b/Mailman/chains/base.py @@ -58,23 +58,17 @@ class TerminalChainBase: """ raise NotImplementedError - def get_rule(self, name): - """See `IChain`. - - This always returns the globally registered named rule. - """ - return config.rules[name] - def get_links(self, mlist, msg, msgdata): """See `IChain`.""" return iter(self) def __iter__(self): """See `IChainIterator`.""" + truth = config.rules['truth'] # First, yield a link that always runs the process method. - yield Link('truth', LinkAction.run, function=self._process) + yield Link(truth, LinkAction.run, function=self._process) # Now yield a rule that stops all processing. - yield Link('truth', LinkAction.stop) + yield Link(truth, LinkAction.stop) @@ -98,13 +92,6 @@ class Chain: """See `IMutableChain`.""" self._links = [] - def get_rule(self, name): - """See `IChain`. - - This always returns the globally registered named rule. - """ - return config.rules[name] - def get_links(self, mlist, msg, msgdata): """See `IChain`.""" return iter(ChainIterator(self)) |
