useful-scripts/pyutil/pygtail.py
def next(self):
        """
        Return the next line in the file, updating the offset.
        """
        try:
            line = self._get_next_line()
        except StopIteration:
            # we've reached the end of the file; if we're processing the
            # rotated log file or the file has been renamed, we can continue with the actual file; otherwise
            # update the offset file
            if self._is_new_file():
                self._rotated_logfile = None
                self._fh.close()
                self._offset = 0
                # open up current logfile and continue
                try:
                    line = self._get_next_line()
                except StopIteration:  # oops, empty file
                    self._update_offset_file()
                    raise
            else:
                self._update_offset_file()
                raise

        if self.paranoid:
            self._update_offset_file()
        elif self.every_n and self.every_n <= self._since_update:
            self._update_offset_file()

        return line

        Return the next line in the file, updating the offset.
        
Return the next line in the file, updating the offset.
Return the next line in the file updating the offset .
def next(self):
        try:
            line = self._get_next_line()
        except StopIteration:
            if self._is_new_file():
                self._rotated_logfile = None
                self._fh.close()
                self._offset = 0
                try:
                    line = self._get_next_line()
                except StopIteration:  
                    self._update_offset_file()
                    raise
            else:
                self._update_offset_file()
                raise
        if self.paranoid:
            self._update_offset_file()
        elif self.every_n and self.every_n <= self._since_update:
            self._update_offset_file()
        return line
def next ( self ) : try : line = self . _get_next_line ( ) except StopIteration : if self . _is_new_file ( ) : self . _rotated_logfile = None self . _fh . close ( ) self . _offset = 0 try : line = self . _get_next_line ( ) except StopIteration : self . _update_offset_file ( ) raise else : self . _update_offset_file ( ) raise if self . paranoid : self . _update_offset_file ( ) elif self . every_n and self . every_n <= self . _since_update : self . _update_offset_file ( ) return line
Return the next line in the file, updating the offset.
Return the next line in the file updating the offset .
"""
        Return the next line in the file, updating the offset.
        """ # we've reached the end of the file; if we're processing the # rotated log file or the file has been renamed, we can continue with the actual file; otherwise # update the offset file # open up current logfile and continue # oops, empty file
self