diff --git a/Lib/email/Charset.py b/Lib/email/Charset.py index 4a7ef695766..9a54dab9ef8 100644 --- a/Lib/email/Charset.py +++ b/Lib/email/Charset.py @@ -7,8 +7,10 @@ def _is_unicode(x): return 1==0 else: + # Use UnicodeType instead of built-in unicode for Py2.1 compatibility + from types import UnicodeType def _is_unicode(x): - return isinstance(x, unicode) + return isinstance(x, UnicodeType) from email.Encoders import encode_7or8bit import email.base64MIME