(self)
Yields Flow objects from the dump.
Yields Flow objects from the dump.
Yields Flow objects from the dump .
def stream(self):
        """
            Yields Flow objects from the dump.
        """
        off = 0
        try:
            while 1:
                data = tnetstring.load(self.fo)
                if tuple(data["version"][:1]) != version.IVERSION[:1]:
                    v = ".".join(str(i) for i in data["version"])
                    raise FlowReadError("Incompatible serialized data version: %s"%v)
                off = self.fo.tell()
                yield Flow._from_state(data)
        except ValueError, v:
            # Error is due to EOF
            if self.fo.tell() == off and self.fo.read() == '':
                return
            raise FlowReadError("Invalid data format.")
def stream ( self ) : off = 0 try : while 1 : data = tnetstring . load ( self . fo ) if tuple ( data [ "version" ] [ : 1 ] ) != version . IVERSION [ : 1 ] : v = "." . join ( str ( i ) for i in data [ "version" ] ) raise FlowReadError ( "Incompatible serialized data version: %s" % v ) off = self . fo . tell ( ) yield Flow . _from_state ( data ) except ValueError , v : # Error is due to EOF if self . fo . tell ( ) == off and self . fo . read ( ) == '' : return raise FlowReadError ( "Invalid data format." )