From: Fred Drake Date: Thu, 18 Jul 2002 19:17:20 +0000 (+0000) Subject: Expose the fileno() method of the underlying log reader. X-Git-Tag: v2.3c1~4953 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7d17e6f3d05ec473a107a0d6b666f3637636d3bd;p=thirdparty%2FPython%2Fcpython.git Expose the fileno() method of the underlying log reader. Remove the crufty support for Python's that don't have StopIteration; the HotShot patch for Python 2.1 has not been maintained. --- diff --git a/Lib/hotshot/log.py b/Lib/hotshot/log.py index 9084461c290f..a5020dddec92 100644 --- a/Lib/hotshot/log.py +++ b/Lib/hotshot/log.py @@ -21,12 +21,6 @@ EXIT = WHAT_EXIT LINE = WHAT_LINENO -try: - StopIteration -except NameError: - StopIteration = IndexError - - class LogReader: def __init__(self, logfn): # fileno -> filename @@ -54,6 +48,10 @@ class LogReader: def close(self): self._reader.close() + def fileno(self): + """Return the file descriptor of the log reader's log file.""" + return self._reader.fileno() + def addinfo(self, key, value): """This method is called for each additional ADD_INFO record.