Blame SOURCES/mailman-2.1.15-rh1351939.patch
|
|
49da8b |
=== modified file 'Mailman/Handlers/SpamDetect.py'
|
|
|
49da8b |
--- Mailman/Handlers/SpamDetect.py 2012-02-05 21:37:29 +0000
|
|
|
49da8b |
+++ Mailman/Handlers/SpamDetect.py 2013-10-08 04:57:09 +0000
|
|
|
49da8b |
@@ -27,6 +27,7 @@
|
|
|
49da8b |
|
|
|
49da8b |
import re
|
|
|
49da8b |
|
|
|
49da8b |
+from email.Errors import HeaderParseError
|
|
|
49da8b |
from email.Header import decode_header
|
|
|
49da8b |
|
|
|
49da8b |
from Mailman import mm_cfg
|
|
|
49da8b |
@@ -68,7 +69,10 @@
|
|
|
49da8b |
headers = ''
|
|
|
49da8b |
for h, v in msg.items():
|
|
|
49da8b |
uvalue = u''
|
|
|
49da8b |
- v = decode_header(re.sub('\n\s', ' ', v))
|
|
|
49da8b |
+ try:
|
|
|
49da8b |
+ v = decode_header(re.sub('\n\s', ' ', v))
|
|
|
49da8b |
+ except HeaderParseError:
|
|
|
49da8b |
+ v = [(v, 'us-ascii')]
|
|
|
49da8b |
for frag, cs in v:
|
|
|
49da8b |
if not cs:
|
|
|
49da8b |
cs = 'us-ascii'
|