[ mailman-Patches-1189243 ] Unhandle exception in Message.get_content_charset()

SourceForge.net noreply at sourceforge.net
Mon Apr 25 06:50:08 CEST 2005


Patches item #1189243, was opened at 2005-04-25 04:16
Message generated for change (Comment added) made by tkikuchi
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=300103&aid=1189243&group_id=103

Category: None
Group: Mailman 2.1
>Status: Closed
>Resolution: Accepted
Priority: 5
Submitted By: Jon Parise (jparise)
Assigned to: Nobody/Anonymous (nobody)
Summary: Unhandle exception in Message.get_content_charset()

Initial Comment:
Message.get_content_charset() can encounter an
unhandled exception "(TypeError: unicode() argument 2
must be string, not None") when charset is None.  This
can can only occur when the call to
email.Message.Message.get_content_charset(self,
failobj) itself returns None, but, not being acquainted
with the email package, I don't understand the
circumstances which can cause this situation.

Regardless, when charset is None, the call to unicode()
will throw the TypeError exception.  The attached patch
recognizes this as a valid failure case such that
failobj will be returned.

----------------------------------------------------------------------

>Comment By: Tokio Kikuchi (tkikuchi)
Date: 2005-04-25 04:50

Message:
Logged In: YES 
user_id=67709

Thank you!  I just fixed in CVS.
(I'd rather make it bare except ...)


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=300103&aid=1189243&group_id=103


More information about the Mailman-coders mailing list