Modules have now the name __main__ if they contain dots.

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

No files matched your search

+4 -1
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)