Skip to content

Commit

Permalink
Handle newer versions of coverage.py.
Browse files Browse the repository at this point in the history
  • Loading branch information
benmwebb committed Jul 29, 2015
1 parent aaa76f2 commit c695c8f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tools/html_coverage.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@ def action(target, source, env):

cov = coverage.coverage(branch=True)
cov.combine()
cov.file_locator.relative_dir = topdir + '/'
if hasattr(coverage.files, 'RELATIVE_DIR'):
coverage.files.RELATIVE_DIR = topdir + '/'
else:
cov.file_locator.relative_dir = topdir + '/'
cov.html_report(mods, directory='html_coverage/python')
else:
print "Could not find new enough coverage module"
Expand Down

0 comments on commit c695c8f

Please sign in to comment.