aboutsummaryrefslogtreecommitdiffstats
path: root/Mailman/Handlers/ToDigest.py
diff options
context:
space:
mode:
authorYasuhito FUTATSUKI at POEM <futatuki@poem.co.jp>2017-04-26 14:33:19 +0900
committerYasuhito FUTATSUKI at POEM <futatuki@poem.co.jp>2017-04-26 14:33:19 +0900
commit588da6057bfe19df9ef7d8667da41fc9888c7bd9 (patch)
treedfd1cb72b8761cc43ffb49be6129d85fcb0aef0a /Mailman/Handlers/ToDigest.py
parent2ad1a49e7210ef6cd1f1752508da571c08abe763 (diff)
parent4657d9ae7b6c0b696ae2557a89469ac7f29c9289 (diff)
downloadmailman2-588da6057bfe19df9ef7d8667da41fc9888c7bd9.tar.gz
mailman2-588da6057bfe19df9ef7d8667da41fc9888c7bd9.tar.xz
mailman2-588da6057bfe19df9ef7d8667da41fc9888c7bd9.zip
merge lp:mailman/2.1 up to rev 1699
Diffstat (limited to 'Mailman/Handlers/ToDigest.py')
-rw-r--r--Mailman/Handlers/ToDigest.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/Mailman/Handlers/ToDigest.py b/Mailman/Handlers/ToDigest.py
index 02965f82..046cbaba 100644
--- a/Mailman/Handlers/ToDigest.py
+++ b/Mailman/Handlers/ToDigest.py
@@ -1,4 +1,4 @@
-# Copyright (C) 1998-2016 by the Free Software Foundation, Inc.
+# Copyright (C) 1998-2017 by the Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -215,8 +215,8 @@ def send_i18n_digests(mlist, mboxfp):
# RFC 1153
print >> plainmsg, mastheadtxt
print >> plainmsg
- # Now add the optional digest header
- if mlist.digest_header:
+ # Now add the optional digest header but only if more than whitespace.
+ if re.sub('\s', '', mlist.digest_header):
headertxt = decorate(mlist, mlist.digest_header, _('digest header'))
# MIME
header = MIMEText(headertxt, _charset=lcset)
@@ -365,8 +365,8 @@ def send_i18n_digests(mlist, mboxfp):
print >> plainmsg, payload
if not payload.endswith('\n'):
print >> plainmsg
- # Now add the footer
- if mlist.digest_footer:
+ # Now add the footer but only if more than whitespace.
+ if re.sub('\s', '', mlist.digest_footer):
footertxt = decorate(mlist, mlist.digest_footer, _('digest footer'))
# MIME
footer = MIMEText(footertxt, _charset=lcset)