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
commitb7e427abd66c45b094e9159b669490d36c0fb5bc (patch)
tree54122b64433a149d710ce0ab2e7072cc2f86d8a7 /coverage/html.py
parentddf1d8419b10f4a9103397497e2486e571aff831 (diff)
downloadpython-coveragepy-git-b7e427abd66c45b094e9159b669490d36c0fb5bc.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 4814c943..00b92587 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: