diff options
Diffstat (limited to 'Mailman/interfaces/chain.py')
| -rw-r--r-- | Mailman/interfaces/chain.py | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/Mailman/interfaces/chain.py b/Mailman/interfaces/chain.py index eca663b30..63d7eb7f7 100644 --- a/Mailman/interfaces/chain.py +++ b/Mailman/interfaces/chain.py @@ -63,12 +63,6 @@ class IChain(Interface): name = Attribute('Chain name; must be unique.') description = Attribute('A brief description of the chain.') - def __iter__(): - """Iterate over all the IChainLinks in this chain. - - :return: an IChainLink. - """ - def get_rule(name): """Lookup and return the named rule. @@ -79,6 +73,26 @@ class IChain(Interface): :raises: KeyError if the named rule cannot be found. """ + def get_links(mlist, msg, msgdata): + """Get an `IChainIterator` for processing. + + :param mlist: the IMailingList object + :param msg: the message being processed + :param msgdata: the message metadata dictionary + :return: An `IChainIterator`. + """ + + + +class IChainIterator(Interface): + """An iterator over chain rules.""" + + def __iter__(): + """Iterate over all the IChainLinks in this chain. + + :return: an IChainLink. + """ + class IMutableChain(IChain): |
