From 01e397975795bdb102221fb5e977fef052cc88f3 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Wed, 13 Oct 2010 01:04:36 +0000 Subject: [PATCH] account for the module __dict__ being cleared when its module is --- Lib/runpy.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/runpy.py b/Lib/runpy.py index f25108186c..4738df307a 100644 --- a/Lib/runpy.py +++ b/Lib/runpy.py @@ -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) -- 2.40.0