diff options
author | Meador Inge <meadori@gmail.com> | 2013-09-03 21:53:22 (GMT) |
---|---|---|
committer | Meador Inge <meadori@gmail.com> | 2013-09-03 21:53:22 (GMT) |
commit | 9ab358ad7cfc235556f52923bcf265b5bc32b4fc (patch) | |
tree | 7c1c2b1a5ad6706cc07e61236effadc4ff3d0f97 /Lib/importlib/_bootstrap.py | |
parent | c6171e49ab2aee5807bcb6c0f77d0de13a164a99 (diff) | |
parent | d151da9ef7de3ce93f0e29a62ae2a470495db1d0 (diff) | |
download | cpython-9ab358ad7cfc235556f52923bcf265b5bc32b4fc.zip cpython-9ab358ad7cfc235556f52923bcf265b5bc32b4fc.tar.gz cpython-9ab358ad7cfc235556f52923bcf265b5bc32b4fc.tar.bz2 |
Issue #16826: Don't check for PYTHONCASEOK when using -E.
This commit fixes a regression that sneaked into Python 3.3 where importlib
was not respecting -E when checking for the PYTHONCASEOK environment variable.
Diffstat (limited to 'Lib/importlib/_bootstrap.py')
-rw-r--r-- | Lib/importlib/_bootstrap.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/importlib/_bootstrap.py b/Lib/importlib/_bootstrap.py index 9174057..fad91ca 100644 --- a/Lib/importlib/_bootstrap.py +++ b/Lib/importlib/_bootstrap.py @@ -29,7 +29,10 @@ def _make_relax_case(): if sys.platform.startswith(_CASE_INSENSITIVE_PLATFORMS): def _relax_case(): """True if filenames must be checked case-insensitively.""" - return b'PYTHONCASEOK' in _os.environ + if sys.flags.ignore_environment: + return False + else: + return b'PYTHONCASEOK' in _os.environ else: def _relax_case(): """True if filenames must be checked case-insensitively.""" |