8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 32616cf commit 30d4896Copy full SHA for 30d4896
Lib/hotshot/log.py
@@ -51,6 +51,9 @@ def __init__(self, logfn):
51
self._append = self._stack.append
52
self._pop = self._stack.pop
53
54
+ def close(self):
55
+ self._reader.close()
56
+
57
def addinfo(self, key, value):
58
"""This method is called for each additional ADD_INFO record.
59
Lib/test/test_hotshot.py
@@ -31,10 +31,7 @@ def next(self, index=None):
31
try:
32
return hotshot.log.LogReader.next(self)
33
except (IndexError, StopIteration):
34
- # XXX This fails on Windows because the named file is still
35
- # XXX open. Offhand I couldn't find an appropriate way to close
36
- # XXX the file object, or even where the heck it is. LogReader
37
- # XXX in particular doesn't have a close() method.
+ self.close()
38
os.unlink(self.__logfn)
39
raise
40
0 commit comments