summaryrefslogtreecommitdiff
path: root/coverage/html.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2012-03-18 23:58:19 -0400
committerNed Batchelder <ned@nedbatchelder.com>2012-03-18 23:58:19 -0400
commit53357077986f061b6a1fbe2a15cde14c4da6dae8 (patch)
tree67260e9ea5cc7d8a081e4ef0c1eb74a807ceb00f /coverage/html.py
parentc5df2f53ad007a6b79f0a94c8dd6c08e206a7b56 (diff)
downloadpython-coveragepy-53357077986f061b6a1fbe2a15cde14c4da6dae8.tar.gz
Make tests run on PyPy, and make test_farm more comprehensible.
Diffstat (limited to 'coverage/html.py')
-rw-r--r--coverage/html.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/coverage/html.py b/coverage/html.py
index 4814c94..00b9258 100644
--- a/coverage/html.py
+++ b/coverage/html.py
@@ -246,7 +246,11 @@ class HtmlStatus(object):
usable = False
try:
status_file = os.path.join(directory, self.STATUS_FILE)
- status = pickle.load(open(status_file, "rb"))
+ fstatus = open(status_file, "rb")
+ try:
+ status = pickle.load(fstatus)
+ finally:
+ fstatus.close()
except IOError:
usable = False
else: