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