diff options
author | Andrew Hoos <andrewjhoos@gmail.com> | 2016-11-29 17:56:47 -0800 |
---|---|---|
committer | Andrew Hoos <andrewjhoos@gmail.com> | 2016-11-29 17:56:47 -0800 |
commit | ae77a6b8880f036e8006ca75da4b9b4946f7d18d (patch) | |
tree | 06d47dc53de834aa2ccab67ea3e768ca3963f07b | |
parent | b02f118d6f1e43113f6ea4a7d0ad750ff5cf7edb (diff) | |
download | python-coveragepy-ae77a6b8880f036e8006ca75da4b9b4946f7d18d.tar.gz |
Limit changes to only execfile.py
-rw-r--r-- | coverage/cmdline.py | 5 | ||||
-rw-r--r-- | coverage/execfile.py | 1 |
2 files changed, 4 insertions, 2 deletions
diff --git a/coverage/cmdline.py b/coverage/cmdline.py index bbddf0a..8942024 100644 --- a/coverage/cmdline.py +++ b/coverage/cmdline.py @@ -754,7 +754,10 @@ def main(argv=None): try: status = CoverageScript().command_line(argv) except ExceptionDuringRun as err: - # An exception was caught while running the product code. + # An exception was caught while running the product code. The + # sys.exc_info() return tuple is packed into an ExceptionDuringRun + # exception. + traceback.print_exception(*err.args) status = ERR except CoverageException as err: # A controlled error inside coverage.py: print the message to the user. diff --git a/coverage/execfile.py b/coverage/execfile.py index d1aa252..fbb829f 100644 --- a/coverage/execfile.py +++ b/coverage/execfile.py @@ -202,7 +202,6 @@ def run_python_file(filename, args, package=None, modulename=None, path0=None): raise except: typ, err, tb = sys.exc_info() - traceback.print_exception(typ, err, tb.tb_next) raise ExceptionDuringRun(typ, err, tb.tb_next) finally: |