[Patches] [ python-Patches-1449244 ] email.message.py charset can be unicode instance

SourceForge.net noreply at sourceforge.net
Tue Mar 14 00:56:11 CET 2006


Patches item #1449244, was opened at 2006-03-13 23:55
Message generated for change (Settings changed) made by tkikuchi
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1449244&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Library (Lib)
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: Tokio Kikuchi (tkikuchi)
>Assigned to: Barry A. Warsaw (bwarsaw)
Summary: email.message.py charset can be unicode instance

Initial Comment:
*_charset in Charset become unicode instance in
email-4.0a. message.py should add this for type test.

--- email-4.0a2/email/message.py  Mon Mar  6 04:58:33 2006
+++ email/message.py    Mon Mar  6 14:59:04 2006
@@ -238,7 +238,7 @@
             self.del_param('charset')
             self._charset = None
             return
-        if isinstance(charset, str):
+        if isinstance(charset, str) or
isinstance(charset, unicode):
             charset = email.charset.Charset(charset)
         if not isinstance(charset, email.charset.Charset):
             raise TypeError(charset) 


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

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1449244&group_id=5470


More information about the Patches mailing list