summaryrefslogtreecommitdiff
path: root/coverage/html.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2014-05-18 21:26:57 -0400
committerNed Batchelder <ned@nedbatchelder.com>2014-05-18 21:26:57 -0400
commit15a675c32d58a46d5dad2d4b56e1fa67dd25b209 (patch)
treedb8d5f3f57188a822a16f868e3db631a70c5088a /coverage/html.py
parent5041e9590c5198f3b3cc07cc62b75a8b79898b71 (diff)
downloadpython-coveragepy-15a675c32d58a46d5dad2d4b56e1fa67dd25b209.tar.gz
Continued refactoring of CodeUnit
Diffstat (limited to 'coverage/html.py')
-rw-r--r--coverage/html.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/coverage/html.py b/coverage/html.py
index 15afca8..159ae58 100644
--- a/coverage/html.py
+++ b/coverage/html.py
@@ -148,9 +148,7 @@ class HtmlReporter(Reporter):
def html_file(self, cu, analysis):
"""Generate an HTML file for one source file."""
- source_file = cu.source_file()
- with source_file:
- source = source_file.read()
+ source = cu.source()
# Find out if the file on disk is already correct.
flat_rootname = cu.flat_rootname()