diff options
Diffstat (limited to 'Lib/importlib/__init__.py')
-rw-r--r-- | Lib/importlib/__init__.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/importlib/__init__.py b/Lib/importlib/__init__.py index 22c90f2..d07f02e 100644 --- a/Lib/importlib/__init__.py +++ b/Lib/importlib/__init__.py @@ -68,6 +68,8 @@ def find_loader(name, path=None): return loader except KeyError: pass + except AttributeError: + raise ValueError('{}.__loader__ is not set'.format(name)) return _bootstrap._find_module(name, path) |