]> granicus.if.org Git - python/commitdiff
Simplify; the low-level log reader is now always a modern iterator,
authorFred Drake <fdrake@acm.org>
Thu, 18 Jul 2002 19:20:23 +0000 (19:20 +0000)
committerFred Drake <fdrake@acm.org>
Thu, 18 Jul 2002 19:20:23 +0000 (19:20 +0000)
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.)

Lib/hotshot/log.py

index a5020dddec9238e35f5cf3397336493b654a1962..5c01996ebdcce405b770b1aec22ff145ed43d0dd 100644 (file)
@@ -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