]> granicus.if.org Git - python/commitdiff
don't bother keeping a set we'll never use
authorBenjamin Peterson <benjamin@python.org>
Wed, 18 Apr 2012 19:25:50 +0000 (15:25 -0400)
committerBenjamin Peterson <benjamin@python.org>
Wed, 18 Apr 2012 19:25:50 +0000 (15:25 -0400)
Lib/importlib/_bootstrap.py

index 142461aaf23ed74acc74463e710a936ed842de34..6478db5d23ed525046b3d6cd33871a500613fe92 100644 (file)
@@ -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: