From 595c5153b19fc5ef3e78adea6b1fa7776bedd15b Mon Sep 17 00:00:00 2001 From: bwarsaw <> Date: Mon, 1 Dec 2003 01:43:18 +0000 Subject: 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. --- Mailman/Handlers/Scrubber.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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. -- cgit v1.2.3