aboutsummaryrefslogtreecommitdiffstats
path: root/Mailman/Handlers/Decorate.py
diff options
context:
space:
mode:
authortkikuchi <>2004-12-01 05:11:39 +0000
committertkikuchi <>2004-12-01 05:11:39 +0000
commit983c1a3fb43179ad781cee37cc6c9d8a3d4aa178 (patch)
treee4da97ac8e602f57b16d901e547d762db9aa3210 /Mailman/Handlers/Decorate.py
parentc68b2872521846669cea46c7abd24a3152d21c8b (diff)
downloadmailman2-983c1a3fb43179ad781cee37cc6c9d8a3d4aa178.tar.gz
mailman2-983c1a3fb43179ad781cee37cc6c9d8a3d4aa178.tar.xz
mailman2-983c1a3fb43179ad781cee37cc6c9d8a3d4aa178.zip
Precautions against 'charset=' (empty) message.
Diffstat (limited to '')
-rw-r--r--Mailman/Handlers/Decorate.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/Mailman/Handlers/Decorate.py b/Mailman/Handlers/Decorate.py
index b9932a27..64ba8155 100644
--- a/Mailman/Handlers/Decorate.py
+++ b/Mailman/Handlers/Decorate.py
@@ -82,7 +82,10 @@ def process(mlist, msg, msgdata):
# safely add the header/footer to a plain text message since all
# charsets Mailman supports are strict supersets of us-ascii --
# no, UTF-16 emails are not supported yet.
- mcset = msg.get_content_charset('us-ascii')
+ #
+ # TK: Message with 'charset=' cause trouble. So, instead of
+ # mgs.get_content_charset('us-ascii') ...
+ mcset = msg.get_content_charset() or 'us-ascii'
lcset = Utils.GetCharSet(mlist.preferred_language)
msgtype = msg.get_content_type()
# BAW: If the charsets don't match, should we add the header and footer by