diff options
Diffstat (limited to 'Lib/importlib/_bootstrap.py')
-rw-r--r-- | Lib/importlib/_bootstrap.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/importlib/_bootstrap.py b/Lib/importlib/_bootstrap.py index 44349a8..39cf76a 100644 --- a/Lib/importlib/_bootstrap.py +++ b/Lib/importlib/_bootstrap.py @@ -713,10 +713,12 @@ class PathFinder: the default hook, for which ImportError is raised. """ + if path == '': + path = _os.getcwd() try: finder = sys.path_importer_cache[path] except KeyError: - finder = cls._path_hooks(path if path != '' else _os.getcwd()) + finder = cls._path_hooks(path) sys.path_importer_cache[path] = finder else: if finder is None and default: |