coverage reporting does not handle multiple runs correctly

Issue #271 invalid
Former user created an issue

when run coverage the second time, coverage/html.py line 127 will still try to create symbolic link even if the link has been created in the first try. It fails with exception. Suggest to do the following:

        if not os.path.lexists(os.path.join(self.directory, static)):
            os.symlink(os.path.join(source_dir, static),
                       os.path.join(self.directory, static))

vs. currently it simply create symlink regardless. This is particularly annoying for developers.

Comments (1)

  1. Ned Batchelder repo owner

    Coverage.py doesn't use symlinks for the static files. Debian's python-coverage package has modifications to do that, you'd have to report the bug to them.

  2. Log in to comment