summaryrefslogtreecommitdiffstats
path: root/Lib/importlib
diff options
context:
space:
mode:
authorMeador Inge <meadori@gmail.com>2013-09-03 21:37:26 (GMT)
committerMeador Inge <meadori@gmail.com>2013-09-03 21:37:26 (GMT)
commitd151da9ef7de3ce93f0e29a62ae2a470495db1d0 (patch)
treea07354e9daa84c8cef227097b2e92a935b2ce2c3 /Lib/importlib
parent9edb168dd7f8fbe2da9874de720c2d00e5a3bf7e (diff)
downloadcpython-d151da9ef7de3ce93f0e29a62ae2a470495db1d0.zip
cpython-d151da9ef7de3ce93f0e29a62ae2a470495db1d0.tar.gz
cpython-d151da9ef7de3ce93f0e29a62ae2a470495db1d0.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')
-rw-r--r--Lib/importlib/_bootstrap.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/importlib/_bootstrap.py b/Lib/importlib/_bootstrap.py
index ff10308..f4fdc82 100644
--- a/Lib/importlib/_bootstrap.py
+++ b/Lib/importlib/_bootstrap.py
@@ -33,7 +33,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."""