summaryrefslogtreecommitdiffstats
path: root/Lib/hotshot
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2002-07-18 14:54:28 (GMT)
committerTim Peters <tim.peters@gmail.com>2002-07-18 14:54:28 (GMT)
commit30d489651101ef9f34cad4124b404371a2eeef72 (patch)
treec7989c606a72df152f43596f5c47a95ca35ca075 /Lib/hotshot
parent32616cf8ec7d930024c0031ab7f951d8247bf2fa (diff)
downloadcpython-30d489651101ef9f34cad4124b404371a2eeef72.zip
cpython-30d489651101ef9f34cad4124b404371a2eeef72.tar.gz
cpython-30d489651101ef9f34cad4124b404371a2eeef72.tar.bz2
Gave hotshot.LogReader a close() method, to allow users to close the
file object that LogReader opens. Used it then in test_hotshot; the test passes again on Windows. Thank Guido for the analysis.
Diffstat (limited to 'Lib/hotshot')
-rw-r--r--Lib/hotshot/log.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/hotshot/log.py b/Lib/hotshot/log.py
index 335fff9..9084461 100644
--- a/Lib/hotshot/log.py
+++ b/Lib/hotshot/log.py
@@ -51,6 +51,9 @@ class LogReader:
self._append = self._stack.append
self._pop = self._stack.pop
+ def close(self):
+ self._reader.close()
+
def addinfo(self, key, value):
"""This method is called for each additional ADD_INFO record.