From 15a675c32d58a46d5dad2d4b56e1fa67dd25b209 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Sun, 18 May 2014 21:26:57 -0400 Subject: Continued refactoring of CodeUnit --- coverage/html.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'coverage/html.py') 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() -- cgit v1.2.1