aboutsummaryrefslogtreecommitdiffstats
path: root/Mailman
diff options
context:
space:
mode:
Diffstat (limited to 'Mailman')
-rw-r--r--Mailman/Utils.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Mailman/Utils.py b/Mailman/Utils.py
index 54e63ddf..dda90354 100644
--- a/Mailman/Utils.py
+++ b/Mailman/Utils.py
@@ -36,6 +36,7 @@ import cgi
import htmlentitydefs
import email.Header
import email.Iterators
+from email.Errors import HeaderParseError
from types import UnicodeType
from string import whitespace, digits
try:
@@ -816,6 +817,6 @@ def oneline(s, cset):
ustr = h.__unicode__()
line = UEMPTYSTRING.join(ustr.splitlines())
return line.encode(cset, 'replace')
- except (LookupError, UnicodeError):
+ except (LookupError, UnicodeError, ValueError, HeaderParseError):
# possibly charset problem. return with undecoded string in one line.
return EMPTYSTRING.join(s.splitlines())