Public bug reported:

The HTML report generator crashes when output from a previous run is
present.

Backtrace:
Traceback (most recent call last):
  File "/usr/bin/coverage2", line 9, in <module>
    load_entry_point('coverage==3.6', 'console_scripts', 'coverage2')()
  File "/usr/lib/python2.7/dist-packages/coverage/cmdline.py", line 710, in main
    status = CoverageScript().command_line(argv)
  File "/usr/lib/python2.7/dist-packages/coverage/cmdline.py", line 452, in 
command_line
    **report_args)
  File "/usr/lib/python2.7/dist-packages/coverage/control.py", line 615, in 
html_report
    return reporter.report(morfs)
  File "/usr/lib/python2.7/dist-packages/coverage/html.py", line 94, in report
    self.make_local_static_report_files()
  File "/usr/lib/python2.7/dist-packages/coverage/html.py", line 129, in 
make_local_static_report_files
    os.path.join(self.directory, static))
OSError: [Errno 17] File exists

This is introduced by debian/patches/02.use-system-js-libraries.patch
which creates symlinks for the system jquery libraries but does not
expect this to fail.

This could probably be fixed by wrapping the os.symlink calls in
try:/except IOError.

Steps to reproduce:
1) generate coverage data
2) run "coverage2 html" -> success
3) run "coverage2 html" again in the same directory -> crash

Release: Ubuntu 13.10
Version: 3.6-0ubuntu6

** Affects: python-coverage (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1312093

Title:
  Html report generator crashes when run with existing output

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/python-coverage/+bug/1312093/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to