We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3be0af8 commit e2bd85aCopy full SHA for e2bd85a
Lib/zipimport.py
@@ -88,11 +88,8 @@ def __init__(self, path):
88
raise ZipImportError('not a Zip file', path=path)
89
break
90
91
- try:
92
- files = _zip_directory_cache[path]
93
- except KeyError:
94
- files = _read_directory(path)
95
- _zip_directory_cache[path] = files
+ if path not in _zip_directory_cache:
+ _zip_directory_cache[path] = _read_directory(path)
96
self._cache_is_valid = True
97
self.archive = path
98
# a prefix directory following the ZIP file path.
0 commit comments