aboutsummaryrefslogtreecommitdiffstats
path: root/Mailman/Handlers/Scrubber.py
diff options
context:
space:
mode:
authorbwarsaw <>2003-12-01 01:43:18 +0000
committerbwarsaw <>2003-12-01 01:43:18 +0000
commit595c5153b19fc5ef3e78adea6b1fa7776bedd15b (patch)
treed5426848c1749ea21e3131154e04faba184780f6 /Mailman/Handlers/Scrubber.py
parentdaa484a3f99e4450cadd0fa5981d866f212e4d7f (diff)
downloadmailman2-595c5153b19fc5ef3e78adea6b1fa7776bedd15b.tar.gz
mailman2-595c5153b19fc5ef3e78adea6b1fa7776bedd15b.tar.xz
mailman2-595c5153b19fc5ef3e78adea6b1fa7776bedd15b.zip
True/False where appropriate.
process(): When we encode the text, catch ValueError along with UnicodeError and LookupError. The ValueError can be raised if the charset is the empty string. Closes SF bug # 834486.
Diffstat (limited to '')
-rw-r--r--Mailman/Handlers/Scrubber.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Mailman/Handlers/Scrubber.py b/Mailman/Handlers/Scrubber.py
index 6a2f59ee..eccdc6e2 100644
--- a/Mailman/Handlers/Scrubber.py
+++ b/Mailman/Handlers/Scrubber.py
@@ -308,7 +308,7 @@ Url : %(url)s
if partcharset and partcharset <> charset:
try:
t = unicode(t, partcharset, 'replace')
- except (UnicodeError, LookupError):
+ except (UnicodeError, LookupError, ValueError):
# Replace funny characters. We use errors='replace' for
# both calls since the first replace will leave U+FFFD,
# which isn't ASCII encodeable.