diff options
author | Benjamin Peterson <benjamin@python.org> | 2012-02-20 14:02:57 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2012-02-20 14:02:57 (GMT) |
commit | 0588eac21852d25c8ab1cac09aec9668bc38df9f (patch) | |
tree | 7f7529f554278ab22d5e30c459a5edb7edaeeb53 | |
parent | 43844351c3d2af87245b0e2a12047c0f224e0edb (diff) | |
parent | b67075beb573c6894758c0469c63e27a3be03067 (diff) | |
download | cpython-0588eac21852d25c8ab1cac09aec9668bc38df9f.zip cpython-0588eac21852d25c8ab1cac09aec9668bc38df9f.tar.gz cpython-0588eac21852d25c8ab1cac09aec9668bc38df9f.tar.bz2 |
merge heads
-rw-r--r-- | Lib/importlib/_bootstrap.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Lib/importlib/_bootstrap.py b/Lib/importlib/_bootstrap.py index f690937..fe5f911 100644 --- a/Lib/importlib/_bootstrap.py +++ b/Lib/importlib/_bootstrap.py @@ -22,12 +22,13 @@ work. One should use importlib as the public-facing version of this module. CASE_INSENSITIVE_PLATFORMS = 'win', 'cygwin', 'darwin' -def _relax_case(): - """True if filenames must be checked case-insensitively.""" +def _make_relax_case(): if any(map(sys.platform.startswith, CASE_INSENSITIVE_PLATFORMS)): + """True if filenames must be checked case-insensitively.""" def _relax_case(): return b'PYTHONCASEOK' in _os.environ else: + """True if filenames must be checked case-insensitively.""" def _relax_case(): return False return _relax_case @@ -1117,7 +1118,7 @@ def _setup(sys_module, imp_module): setattr(self_module, '_os', os_module) setattr(self_module, 'path_sep', path_sep) # Constants - setattr(self_module, '_relax_case', _relax_case()) + setattr(self_module, '_relax_case', _make_relax_case()) def _install(sys_module, imp_module): |