From d151da9ef7de3ce93f0e29a62ae2a470495db1d0 Mon Sep 17 00:00:00 2001 From: Meador Inge Date: Tue, 3 Sep 2013 16:37:26 -0500 Subject: 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. --- Lib/importlib/_bootstrap.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'Lib/importlib/_bootstrap.py') diff --git a/Lib/importlib/_bootstrap.py b/Lib/importlib/_bootstrap.py index ff10308c3a..f4fdc82b1e 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.""" -- cgit v1.2.1