diff options
author | Tim Peters <tim.peters@gmail.com> | 2002-07-18 14:54:28 (GMT) |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2002-07-18 14:54:28 (GMT) |
commit | 30d489651101ef9f34cad4124b404371a2eeef72 (patch) | |
tree | c7989c606a72df152f43596f5c47a95ca35ca075 /Lib/test/test_hotshot.py | |
parent | 32616cf8ec7d930024c0031ab7f951d8247bf2fa (diff) | |
download | cpython-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/test/test_hotshot.py')
-rw-r--r-- | Lib/test/test_hotshot.py | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/Lib/test/test_hotshot.py b/Lib/test/test_hotshot.py index db3c914..2a45a7f 100644 --- a/Lib/test/test_hotshot.py +++ b/Lib/test/test_hotshot.py @@ -31,10 +31,7 @@ class UnlinkingLogReader(hotshot.log.LogReader): try: return hotshot.log.LogReader.next(self) except (IndexError, StopIteration): - # XXX This fails on Windows because the named file is still - # XXX open. Offhand I couldn't find an appropriate way to close - # XXX the file object, or even where the heck it is. LogReader - # XXX in particular doesn't have a close() method. + self.close() os.unlink(self.__logfn) raise |