From: Fred Drake Date: Thu, 18 Jul 2002 19:20:23 +0000 (+0000) Subject: Simplify; the low-level log reader is now always a modern iterator, X-Git-Tag: v2.3c1~4951 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fbe36082906201210da081d71c6ac7b30f7ef1a2;p=python 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.) --- diff --git a/Lib/hotshot/log.py b/Lib/hotshot/log.py index a5020dddec..5c01996ebd 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