a guest Jun 20th, 2019 58 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- def _path_importer_cache(cls, path):
- """Get the finder for the path entry from sys.path_importer_cache.
- If the path entry is not in the cache, find the appropriate finder
- and cache it. If no finder is available, store None.
- if path == '':
- path = _os.getcwd()
- except FileNotFoundError:
- # Don't cache the failure as the cwd can easily change to
- # a valid directory later on.
- return None
- finder = sys.path_importer_cache[path]
- except KeyError:
- finder = cls._path_hooks(path)
- sys.path_importer_cache[path] = finder
- return finder
RAW Paste Data