diff options
| author | Barry Warsaw | 2009-01-16 21:04:21 -0500 |
|---|---|---|
| committer | Barry Warsaw | 2009-01-16 21:04:21 -0500 |
| commit | ae3d0cc316b826b8325507d960ccf84da601c3b0 (patch) | |
| tree | 3485e2ca463c2131a0ffb1693bc60d569cc9d8b7 /mailman/chains/headers.py | |
| parent | a3f7d07c62b2f7d6ac9d0b700883826c2838db60 (diff) | |
| download | mailman-ae3d0cc316b826b8325507d960ccf84da601c3b0.tar.gz mailman-ae3d0cc316b826b8325507d960ccf84da601c3b0.tar.zst mailman-ae3d0cc316b826b8325507d960ccf84da601c3b0.zip | |
Diffstat (limited to 'mailman/chains/headers.py')
| -rw-r--r-- | mailman/chains/headers.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/mailman/chains/headers.py b/mailman/chains/headers.py index d76e48c50..2f85d78d0 100644 --- a/mailman/chains/headers.py +++ b/mailman/chains/headers.py @@ -17,6 +17,8 @@ """The header-matching chain.""" +from __future__ import absolute_import, unicode_literals + __metaclass__ = type __all__ = [ 'HeaderMatchChain', @@ -56,7 +58,7 @@ def make_link(entry): # We don't assert that the chain exists here because the jump # chain may not yet have been created. else: - raise AssertionError('Bad link description: %s' % entry) + raise AssertionError('Bad link description: {0}'.format(entry)) rule = HeaderMatchRule(header, pattern) chain = config.chains[chain_name] return Link(rule, LinkAction.jump, chain) @@ -73,9 +75,9 @@ class HeaderMatchRule: def __init__(self, header, pattern): self._header = header self._pattern = pattern - self.name = 'header-match-%002d' % HeaderMatchRule._count + self.name = 'header-match-{0:02}'.format(HeaderMatchRule._count) HeaderMatchRule._count += 1 - self.description = u'%s: %s' % (header, pattern) + self.description = '{0}: {1}'.format(header, pattern) # XXX I think we should do better here, somehow recording that a # particular header matched a particular pattern, but that gets ugly # with RFC 2822 headers. It also doesn't match well with the rule |
