summaryrefslogtreecommitdiff
path: root/Mailman
diff options
context:
space:
mode:
authorbwarsaw2002-12-07 07:42:32 +0000
committerbwarsaw2002-12-07 07:42:32 +0000
commita6509e0529d7e481c8a7948d4f9734aac1039318 (patch)
tree45592ef50b2c3afb23c8beae540ce0449ac01c66 /Mailman
parent37884281c8404ba421c50131dbd639350c51ef83 (diff)
downloadmailman-a6509e0529d7e481c8a7948d4f9734aac1039318.tar.gz
mailman-a6509e0529d7e481c8a7948d4f9734aac1039318.tar.zst
mailman-a6509e0529d7e481c8a7948d4f9734aac1039318.zip
decode_charset(): Greg Ward's patch for SF # 649007. If there is an
unknown character set specified in an RFC 2047 encoded header, or in the Content-Type of one of the parts, we'd get a LookupError. This simply moves the make_header() call to inside the try/except.
Diffstat (limited to 'Mailman')
-rw-r--r--Mailman/Archiver/HyperArch.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Mailman/Archiver/HyperArch.py b/Mailman/Archiver/HyperArch.py
index d8c2f2309..be72562d7 100644
--- a/Mailman/Archiver/HyperArch.py
+++ b/Mailman/Archiver/HyperArch.py
@@ -386,10 +386,10 @@ class Article(pipermail.Article):
mustunicode = 1
break
if mustunicode:
- # Use a large number for maxlinelen so it won't get wrapped
- h = make_header(pairs, 99999)
# Use __unicode__() until we can guarantee Python 2.2
try:
+ # Use a large number for maxlinelen so it won't get wrapped
+ h = make_header(pairs, 99999)
return h.__unicode__(), None
except (UnicodeError, LookupError):
# Unknown encoding