aboutsummaryrefslogtreecommitdiffstats
path: root/Mailman/Handlers/CookHeaders.py
diff options
context:
space:
mode:
authorYasuhito FUTATSUKI at POEM <futatuki@poem.co.jp>2019-06-21 07:51:01 +0900
committerYasuhito FUTATSUKI at POEM <futatuki@poem.co.jp>2019-06-21 07:51:01 +0900
commit3d32d14b3929489226106ee935bcbb6242b71866 (patch)
tree91507de6cf467ed68f63e6d1aa6c29c317ca662f /Mailman/Handlers/CookHeaders.py
parent83402ad71a22c272ea825068e496efc7fdcebb86 (diff)
parenta5de21c5b47e37b65f66975e7a8ca82be2bc3de4 (diff)
downloadmailman2-3d32d14b3929489226106ee935bcbb6242b71866.tar.gz
mailman2-3d32d14b3929489226106ee935bcbb6242b71866.tar.xz
mailman2-3d32d14b3929489226106ee935bcbb6242b71866.zip
merge lp:mailman/2.1 up to rev 1817
Diffstat (limited to 'Mailman/Handlers/CookHeaders.py')
-rw-r--r--Mailman/Handlers/CookHeaders.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/Mailman/Handlers/CookHeaders.py b/Mailman/Handlers/CookHeaders.py
index e36c5291..41645d6c 100644
--- a/Mailman/Handlers/CookHeaders.py
+++ b/Mailman/Handlers/CookHeaders.py
@@ -328,6 +328,12 @@ def process(mlist, msg, msgdata):
# 2047 encoded.
i18ndesc = uheader(mlist, mlist.description, 'List-Id', maxlinelen=998)
listid_h = formataddr((str(i18ndesc), listid))
+ # With some charsets (utf-8?) and some invalid chars, str(18ndesc) can
+ # be empty.
+ if str(i18ndesc):
+ listid_h = formataddr((str(i18ndesc), listid))
+ else:
+ listid_h = '<%s>' % listid
else:
# without desc we need to ensure the MUST brackets
listid_h = '<%s>' % listid