mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
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.)
This commit is contained in:
parent
302e2bb81b
commit
fbe3608290
1 changed files with 1 additions and 6 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue