From: Benjamin Peterson Date: Wed, 13 Oct 2010 01:04:36 +0000 (+0000) Subject: account for the module __dict__ being cleared when its module is X-Git-Tag: v3.2a4~647 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=01e397975795bdb102221fb5e977fef052cc88f3;p=thirdparty%2FPython%2Fcpython.git account for the module __dict__ being cleared when its module is --- diff --git a/Lib/runpy.py b/Lib/runpy.py index f25108186c20..4738df307a6b 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)