diff options
author | Benjamin Peterson <benjamin@python.org> | 2012-04-18 19:25:50 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2012-04-18 19:25:50 (GMT) |
commit | 2a481e58ffe7d7719b856e2778751521d266d33a (patch) | |
tree | f0996a640a269035ed7f5bd50873cfc1217ec957 /Lib | |
parent | 23bba4ca398ff2e096413e3bbaf9a6cdaa1d1846 (diff) | |
download | cpython-2a481e58ffe7d7719b856e2778751521d266d33a.zip cpython-2a481e58ffe7d7719b856e2778751521d266d33a.tar.gz cpython-2a481e58ffe7d7719b856e2778751521d266d33a.tar.bz2 |
don't bother keeping a set we'll never use
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/importlib/_bootstrap.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/importlib/_bootstrap.py b/Lib/importlib/_bootstrap.py index 142461a..6478db5 100644 --- a/Lib/importlib/_bootstrap.py +++ b/Lib/importlib/_bootstrap.py @@ -842,7 +842,8 @@ class _FileFinder: # We store two cached versions, to handle runtime changes of the # PYTHONCASEOK environment variable. self._path_cache = set(contents) - self._relaxed_path_cache = set(fn.lower() for fn in contents) + if sys.platform.startswith(CASE_INSENSITIVE_PLATFORMS): + self._relaxed_path_cache = set(fn.lower() for fn in contents) class _SourceFinderDetails: |