summaryrefslogtreecommitdiff
path: root/coverage/annotate.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2009-09-26 20:08:24 -0400
committerNed Batchelder <ned@nedbatchelder.com>2009-09-26 20:08:24 -0400
commitbc4c3ab2349aeb1cdd0840771fff5111e4b7a119 (patch)
tree42237a08654f47a55bde60cf7f023558da82c70a /coverage/annotate.py
parent089564321d2c3722118badabde6164dfbadec1a7 (diff)
downloadpython-coveragepy-bc4c3ab2349aeb1cdd0840771fff5111e4b7a119.tar.gz
HTML report includes non-relative code units also. Fixes issue #11, though the paths displayed in the HTML are kind of heinous.
Diffstat (limited to 'coverage/annotate.py')
-rw-r--r--coverage/annotate.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/coverage/annotate.py b/coverage/annotate.py
index 3cbe240..3130c00 100644
--- a/coverage/annotate.py
+++ b/coverage/annotate.py
@@ -43,6 +43,9 @@ class AnnotateReporter(Reporter):
`cu` is the CodeUnit for the file to annotate.
"""
+ if not cu.relative:
+ return
+
filename = cu.filename
source = cu.source_file()
if self.directory: