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.
This commit is contained in:
Fred Drake 2002-07-18 19:17:20 +00:00
parent 666bf52a16
commit 7d17e6f3d0
1 changed files with 4 additions and 6 deletions

View File

@ -21,12 +21,6 @@ EXIT = WHAT_EXIT
LINE = WHAT_LINENO LINE = WHAT_LINENO
try:
StopIteration
except NameError:
StopIteration = IndexError
class LogReader: class LogReader:
def __init__(self, logfn): def __init__(self, logfn):
# fileno -> filename # fileno -> filename
@ -54,6 +48,10 @@ class LogReader:
def close(self): def close(self):
self._reader.close() 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): def addinfo(self, key, value):
"""This method is called for each additional ADD_INFO record. """This method is called for each additional ADD_INFO record.