diff options
author | Andrew Hoos <andrewjhoos@gmail.com> | 2016-11-29 07:01:48 -0800 |
---|---|---|
committer | Andrew Hoos <andrewjhoos@gmail.com> | 2016-11-29 07:01:48 -0800 |
commit | a834bb295a262bd9ff172748afa9c2a75a1d5a52 (patch) | |
tree | 4d51e1646f129905ff3e3ec6a9068a727b69b0a8 /coverage | |
parent | 998b4e07d8af4d241e70c7cca18a0f72f8ca74dd (diff) | |
download | python-coveragepy-a834bb295a262bd9ff172748afa9c2a75a1d5a52.tar.gz |
Explicitely call sys.excepthook
https://bitbucket.org/ned/coveragepy/issues/535/sysexcepthook-is-not-called
Diffstat (limited to 'coverage')
-rw-r--r-- | coverage/execfile.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/coverage/execfile.py b/coverage/execfile.py index 3e20a52..39d17e9 100644 --- a/coverage/execfile.py +++ b/coverage/execfile.py @@ -192,8 +192,7 @@ def run_python_file(filename, args, package=None, modulename=None, path0=None): # and a nested exception is shown to the user. This getattr fixes # it somehow? https://bitbucket.org/pypy/pypy/issue/1903 getattr(err, '__context__', None) - - raise ExceptionDuringRun(typ, err, tb.tb_next) + sys.excepthook(typ, err, tb.tb_next) finally: # Restore the old __main__, argv, and path. sys.modules['__main__'] = old_main_mod |