From bb98c8cff0987e9c1afbc1967721ff4999c5d381 Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Sat, 1 Jun 2002 03:56:07 +0000 Subject: _is_unicode(): Use UnicodeType instead of the unicode builtin for Python 2.1 compatibility. --- Lib/email/Charset.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Lib/email/Charset.py b/Lib/email/Charset.py index 4a7ef69..9a54dab 100644 --- a/Lib/email/Charset.py +++ b/Lib/email/Charset.py @@ -7,8 +7,10 @@ except NameError: 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 -- cgit v0.12