diff options
Diffstat (limited to 'Lib/zipfile.py')
-rw-r--r-- | Lib/zipfile.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/zipfile.py b/Lib/zipfile.py index 816d887..a06731e 100644 --- a/Lib/zipfile.py +++ b/Lib/zipfile.py @@ -66,7 +66,10 @@ _FH_FILENAME_LENGTH = 10 _FH_EXTRA_FIELD_LENGTH = 11 # Used to compare file passed to ZipFile -_STRING_TYPES = (type('s'), type(u's')) +import types +_STRING_TYPES = (types.StringType,) +if hasattr(types, "UnicodeType"): + _STRING_TYPES = _STRING_TYPES + (types.UnicodeType,) def is_zipfile(filename): |