~barry/mailman/lp1423756

« back to all changes in this revision

Viewing changes to src/mailman/chains/headers.py

  • Committer: Barry Warsaw
  • Date: 2015-01-05 01:20:33 UTC
  • mfrom: (7264.4.66 py3)
  • Revision ID: barry@list.org-20150105012033-zdrw9c2odhpf22fz
Merge the Python 3 branch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
 
18
18
"""The header-matching chain."""
19
19
 
20
 
from __future__ import absolute_import, print_function, unicode_literals
21
 
 
22
 
__metaclass__ = type
23
20
__all__ = [
24
21
    'HeaderMatchChain',
25
22
    ]
28
25
import re
29
26
import logging
30
27
 
31
 
from zope.interface import implementer
32
 
 
33
28
from mailman.chains.base import Chain, Link
34
29
from mailman.config import config
35
30
from mailman.core.i18n import _
36
31
from mailman.interfaces.chain import LinkAction
37
32
from mailman.interfaces.rules import IRule
 
33
from zope.interface import implementer
38
34
 
39
35
 
40
36
log = logging.getLogger('mailman.error')
122
118
        """See `IMutableChain`."""
123
119
        # Remove all dynamically created rules.  Use the keys so we can mutate
124
120
        # the dictionary inside the loop.
125
 
        for rule_name in config.rules.keys():
 
121
        for rule_name in list(config.rules):
126
122
            if rule_name.startswith('header-match-'):
127
123
                del config.rules[rule_name]
128
124
        self._extended_links = []