diff options
| author | bwarsaw | 2006-04-17 13:10:09 +0000 |
|---|---|---|
| committer | bwarsaw | 2006-04-17 13:10:09 +0000 |
| commit | 953d9bff95f70b66b1b6c04340959185a11c3d10 (patch) | |
| tree | bd6aa3c6d30bcace2d628da71bc121f751ff1be2 /Mailman/Utils.py | |
| parent | 0ed815a216c7bb6f820cfdf99fc8d31bcfd19fc0 (diff) | |
| download | mailman-953d9bff95f70b66b1b6c04340959185a11c3d10.tar.gz mailman-953d9bff95f70b66b1b6c04340959185a11c3d10.tar.zst mailman-953d9bff95f70b66b1b6c04340959185a11c3d10.zip | |
Diffstat (limited to 'Mailman/Utils.py')
| -rw-r--r-- | Mailman/Utils.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Mailman/Utils.py b/Mailman/Utils.py index cb3444b17..5e319cad3 100644 --- a/Mailman/Utils.py +++ b/Mailman/Utils.py @@ -39,7 +39,6 @@ import email.Iterators from email.Errors import HeaderParseError from string import ascii_letters, digits, whitespace -from types import UnicodeType from Mailman import Errors from Mailman import Site @@ -787,7 +786,7 @@ def canonstr(s, lang=None): else: newparts.append(c) newstr = EMPTYSTRING.join(newparts) - if isinstance(newstr, UnicodeType): + if isinstance(newstr, unicode): return newstr # We want the default fallback to be iso-8859-1 even if the language is # English (us-ascii). This seems like a practical compromise so that @@ -818,7 +817,7 @@ def uncanonstr(s, lang=None): # set. If so, return it unchanged, except for coercing it to a byte # string. try: - if isinstance(s, UnicodeType): + if isinstance(s, unicode): return s.encode(charset) else: u = unicode(s, charset) |
