summaryrefslogtreecommitdiff
path: root/src/mailman/chains/headers.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/mailman/chains/headers.py')
-rw-r--r--src/mailman/chains/headers.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/mailman/chains/headers.py b/src/mailman/chains/headers.py
index 7628c8b7c..5738336e8 100644
--- a/src/mailman/chains/headers.py
+++ b/src/mailman/chains/headers.py
@@ -17,9 +17,6 @@
"""The header-matching chain."""
-from __future__ import absolute_import, print_function, unicode_literals
-
-__metaclass__ = type
__all__ = [
'HeaderMatchChain',
]
@@ -28,13 +25,12 @@ __all__ = [
import re
import logging
-from zope.interface import implementer
-
from mailman.chains.base import Chain, Link
from mailman.config import config
from mailman.core.i18n import _
from mailman.interfaces.chain import LinkAction
from mailman.interfaces.rules import IRule
+from zope.interface import implementer
log = logging.getLogger('mailman.error')
@@ -122,7 +118,7 @@ class HeaderMatchChain(Chain):
"""See `IMutableChain`."""
# Remove all dynamically created rules. Use the keys so we can mutate
# the dictionary inside the loop.
- for rule_name in config.rules.keys():
+ for rule_name in list(config.rules):
if rule_name.startswith('header-match-'):
del config.rules[rule_name]
self._extended_links = []