diff options
Diffstat (limited to 'Lib/idlelib/EditorWindow.py')
-rw-r--r-- | Lib/idlelib/EditorWindow.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/idlelib/EditorWindow.py b/Lib/idlelib/EditorWindow.py index af60eca0b4..b940c3bbd2 100644 --- a/Lib/idlelib/EditorWindow.py +++ b/Lib/idlelib/EditorWindow.py @@ -30,7 +30,10 @@ def _find_module(fullname, path=None): if descr[2] == imp.PY_SOURCE: break # find but not load the source file module = imp.load_module(tgt, file, filename, descr) - path = module.__path__ + try: + path = module.__path__ + except AttributeError: + raise ImportError, 'No source for module ' + module.__name__ return file, filename, descr class EditorWindow: |