diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2009-12-03 08:54:27 -0500 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2009-12-03 08:54:27 -0500 |
commit | 5f7375fb90aaf728ebf6c9da9a61b5302dcbd71b (patch) | |
tree | 60f4c9265e686d2685c1a10d4a4acdff04ef7f79 /coverage/execfile.py | |
parent | e0b2014fad18f284256c94422d940ceb84e8be24 (diff) | |
parent | 99a3e92e89c3e9d4a0dd73ae71b0b849d7fddbee (diff) | |
download | python-coveragepy-5f7375fb90aaf728ebf6c9da9a61b5302dcbd71b.tar.gz |
Merged default onto config.
Diffstat (limited to 'coverage/execfile.py')
-rw-r--r-- | coverage/execfile.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/coverage/execfile.py b/coverage/execfile.py index ddcfa14..15f0a5f 100644 --- a/coverage/execfile.py +++ b/coverage/execfile.py @@ -16,11 +16,11 @@ except KeyError: def run_python_file(filename, args): """Run a python file as if it were the main program on the command line. - + `filename` is the path to the file to execute, it need not be a .py file. `args` is the argument array to present as sys.argv, including the first element representing the file being executed. - + """ # Create a module to serve as __main__ old_main_mod = sys.modules['__main__'] @@ -44,7 +44,7 @@ def run_python_file(filename, args): finally: # Restore the old __main__ sys.modules['__main__'] = old_main_mod - + # Restore the old argv and path sys.argv = old_argv sys.path[0] = old_path0 |