1
0
forked from VimPlug/jedi

Modules have now the name __main__ if they contain dots.

This commit is contained in:
Dave Halter
2015-04-28 17:29:42 +02:00
parent bb02f99de3
commit 126f490f1e
4 changed files with 22 additions and 6 deletions

View File

@@ -366,10 +366,13 @@ def load_module(path=None, name=None):
# If a module is "corrupt" or not really a Python module or whatever.
debug.warning('Module %s not importable.', path)
return None
finally:
sys.path = temp
# Just access the cache after import, because of #59 as well as the very
# complicated import structure of Python.
module = sys.modules[dotted_path]
sys.path = temp
return CompiledObject(module)