diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2012-03-18 23:58:19 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2012-03-18 23:58:19 -0400 |
commit | 53357077986f061b6a1fbe2a15cde14c4da6dae8 (patch) | |
tree | 67260e9ea5cc7d8a081e4ef0c1eb74a807ceb00f /coverage/html.py | |
parent | c5df2f53ad007a6b79f0a94c8dd6c08e206a7b56 (diff) | |
download | python-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.py | 6 |
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: |