On 6/16/09 12:37 PM, Nestor A. Diaz wrote: > Hello, i had wrapper the loseConnection method, but it still throws the > same excepcion: > > class MySerialPort ( SerialPort ) : > > def __init__(self, the_protocol, port, reactor): > # type, host and port are used for my own purposes. > self.type = "Local" > self.host = None > self.port = port > SerialPort.__init__ (self, the_protocol, port, reactor) > > def loseConnection(self): > > # Fix > self.protocol.transport.flushInput() > self.protocol.transport.flushOutput() > > # call upper class method > SerialPort.loseConnection (self) > > > at least under windows, when i call: serial_port.loseConnection() > > Traceback (most recent call last): <snip> > File "C:\Python24\Lib\site-packages\twisted\internet\abstract.py", > line 101, in doWrite > self.dataBuffer = buffer(self.dataBuffer, self.offset) + > "".join(self._tempDataBuffer) > exceptions.AttributeError: 'MySerialPort' object has no attribute > '_tempDataBuffer' > > Slds. >
Looks like you are running into this bug: http://twistedmatrix.com/trac/ticket/1248 I wish I could be more helpful, but at least you know it's a known issue and where to start addressing it. _______________________________________________ Twisted-Python mailing list [email protected] http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
