diff options
author | Guido van Rossum <guido@python.org> | 2007-05-02 19:09:54 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2007-05-02 19:09:54 (GMT) |
commit | ef87d6ed94780fe00250a551031023aeb2898365 (patch) | |
tree | 1f8989aaaec7ec5f8b2f26498317f2022bf85531 /Lib/email/message.py | |
parent | 572dbf8f1320c0b34b9c786e5c30ba4a4b61b292 (diff) | |
download | cpython-ef87d6ed94780fe00250a551031023aeb2898365.zip cpython-ef87d6ed94780fe00250a551031023aeb2898365.tar.gz cpython-ef87d6ed94780fe00250a551031023aeb2898365.tar.bz2 |
Rip out all the u"..." literals and calls to unicode().
Diffstat (limited to 'Lib/email/message.py')
-rw-r--r-- | Lib/email/message.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/email/message.py b/Lib/email/message.py index 6fc3af1..1767bfb 100644 --- a/Lib/email/message.py +++ b/Lib/email/message.py @@ -751,13 +751,13 @@ class Message: # LookupError will be raised if the charset isn't known to # Python. UnicodeError will be raised if the encoded text # contains a character not in the charset. - charset = unicode(charset[2], pcharset).encode('us-ascii') + charset = str(charset[2], pcharset).encode('us-ascii') except (LookupError, UnicodeError): charset = charset[2] # charset character must be in us-ascii range try: if isinstance(charset, str): - charset = unicode(charset, 'us-ascii') + charset = str(charset, 'us-ascii') charset = charset.encode('us-ascii') except UnicodeError: return failobj |