summaryrefslogtreecommitdiffstats
path: root/Lib/hotshot
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2002-07-18 19:20:23 (GMT)
committerFred Drake <fdrake@acm.org>2002-07-18 19:20:23 (GMT)
commitfbe36082906201210da081d71c6ac7b30f7ef1a2 (patch)
tree3926e7464db8f6ca61c62429a59830e2da8b4cfa /Lib/hotshot
parent302e2bb81b462f2664b71da9f35c2969df8a330e (diff)
downloadcpython-fbe36082906201210da081d71c6ac7b30f7ef1a2.zip
cpython-fbe36082906201210da081d71c6ac7b30f7ef1a2.tar.gz
cpython-fbe36082906201210da081d71c6ac7b30f7ef1a2.tar.bz2
Simplify; the low-level log reader is now always a modern iterator,
and should never return None. (It only did this for an old version of HotShot that was trying to still work with a patched Python 2.1.)
Diffstat (limited to 'Lib/hotshot')
-rw-r--r--Lib/hotshot/log.py7
1 files changed, 1 insertions, 6 deletions
diff --git a/Lib/hotshot/log.py b/Lib/hotshot/log.py
index a5020dd..5c01996 100644
--- a/Lib/hotshot/log.py
+++ b/Lib/hotshot/log.py
@@ -95,12 +95,7 @@ class LogReader:
def next(self, index=0):
while 1:
- try:
- what, tdelta, fileno, lineno = self._nextitem()
- except TypeError:
- # logreader().next() returns None at the end
- self._reader.close()
- raise StopIteration()
+ what, tdelta, fileno, lineno = self._nextitem()
# handle the most common cases first