]> granicus.if.org Git - python/commitdiff
account for the module __dict__ being cleared when its module is
authorBenjamin Peterson <benjamin@python.org>
Wed, 13 Oct 2010 01:04:36 +0000 (01:04 +0000)
committerBenjamin Peterson <benjamin@python.org>
Wed, 13 Oct 2010 01:04:36 +0000 (01:04 +0000)
Lib/runpy.py

index f25108186c205a96d784d0927654fc213021643c..4738df307a6b10ea99076de5ec2996450188e96c 100644 (file)
@@ -271,7 +271,7 @@ def run_path(path_name, init_globals=None, run_name=None):
                  _ModifiedArgv0(path_name):
                 mod_globals = temp_module.module.__dict__
                 return _run_code(code, mod_globals, init_globals,
-                                    run_name, fname, loader, pkg_name)
+                                    run_name, fname, loader, pkg_name).copy()
         finally:
             try:
                 sys.path.remove(path_name)