mirror of
https://github.com/python/cpython.git
synced 2025-07-16 07:45:20 +00:00
Make these modules work when Python is compiled without Unicode support.
This commit is contained in:
parent
11310bf867
commit
dbb718fa87
3 changed files with 18 additions and 5 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue