summaryrefslogtreecommitdiff
path: root/mailman/pipeline/to_digest.py
diff options
context:
space:
mode:
authorBarry Warsaw2009-01-16 21:04:21 -0500
committerBarry Warsaw2009-01-16 21:04:21 -0500
commitae3d0cc316b826b8325507d960ccf84da601c3b0 (patch)
tree3485e2ca463c2131a0ffb1693bc60d569cc9d8b7 /mailman/pipeline/to_digest.py
parenta3f7d07c62b2f7d6ac9d0b700883826c2838db60 (diff)
downloadmailman-ae3d0cc316b826b8325507d960ccf84da601c3b0.tar.gz
mailman-ae3d0cc316b826b8325507d960ccf84da601c3b0.tar.zst
mailman-ae3d0cc316b826b8325507d960ccf84da601c3b0.zip
Diffstat (limited to 'mailman/pipeline/to_digest.py')
-rw-r--r--mailman/pipeline/to_digest.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/mailman/pipeline/to_digest.py b/mailman/pipeline/to_digest.py
index e56c4a109..df2684986 100644
--- a/mailman/pipeline/to_digest.py
+++ b/mailman/pipeline/to_digest.py
@@ -25,6 +25,8 @@
# directory and the DigestRunner will craft the MIME, rfc1153, and
# (eventually) URL-subject linked digests from the mbox.
+from __future__ import absolute_import, unicode_literals
+
__metaclass__ = type
__all__ = [
'ToDigest',
@@ -243,9 +245,9 @@ def send_i18n_digests(mlist, mboxfp):
if not username:
username = addresses[0][1]
if username:
- username = ' (%s)' % username
+ username = ' ({0})'.format(username)
# Put count and Wrap the toc subject line
- wrapped = Utils.wrap('%2d. %s' % (msgcount, subject), 65)
+ wrapped = Utils.wrap('{0:2}. {1}'.format(msgcount, subject), 65)
slines = wrapped.split('\n')
# See if the user's name can fit on the last line
if len(slines[-1]) + len(username) > 70:
@@ -326,8 +328,8 @@ def send_i18n_digests(mlist, mboxfp):
# Honor the default setting
for h in config.digests.plain_digest_keep_headers.split():
if msg[h]:
- uh = Utils.wrap('%s: %s' % (h, Utils.oneline(msg[h],
- in_unicode=True)))
+ uh = Utils.wrap('{0}: {1}'.format(
+ h, Utils.oneline(msg[h], in_unicode=True)))
uh = '\n\t'.join(uh.split('\n'))
print >> plainmsg, uh
print >> plainmsg
@@ -402,8 +404,8 @@ def send_i18n_digests(mlist, mboxfp):
mimerecips.add(email_address)
else:
raise AssertionError(
- 'Digest member "%s" unexpected delivery mode: %s' %
- (email_address, member.delivery_mode))
+ 'Digest member "{0}" unexpected delivery mode: {1}'.format(
+ email_address, member.delivery_mode))
# Zap this since we're now delivering the last digest to these folks.
mlist.one_last_digest.clear()
# MIME