Issue #23 resolved

"Can't find program" exceptions are shown in an ugly way

Ned Batchelder
repo owner created an issue

If you use "coverage run xyzzy.py" and xyzzy.py isn't found, the exception shows stack frames from coverage.py itself:

{{{ C:\ned\coverage\trunk> coverage run xyzzy.py Traceback (most recent call last): File "c:\Python25\Scripts\coverage-script.py", line 8, in <module> load_entry_point('coverage==3.0.1', 'console_scripts', 'coverage')() File "C:\ned\coverage\trunk\coverage\cmdline.py", line 504, in main return CoverageScript().command_line(sys.argv[1:]) File "C:\ned\coverage\trunk\coverage\cmdline.py", line 388, in command_line self.run_python_file(args[0], args) File "C:\ned\coverage\trunk\coverage\execfile.py", line 35, in run_python_file source = open(filename, 'rU').read() IOError: [Errno 2] No such file or directory: 'xyzzy.py' }}}

Comments (3)

  1. Log in to comment