[Twisted-Python] SerialPort.loseConnection() BUG
Jean-Paul Calderone
exarkun at divmod.com
Wed Jun 10 06:23:45 MDT 2009
On Wed, 10 Jun 2009 11:20:15 +0800, biziap biziap <fetbiz at gmail.com> wrote:
Please don't top-post.
>Maybe you can try to call transport.flushInput(), transport.flushOutput()
>before loseConnection().
>
No, this is wrong. Do not call these methods, ever.
>
>2009/6/9 Nestor A. Diaz <nestor at tiendalinux.com>:
>> Hello, there is a bug on the SerialPort Win32 implementation (don't know
>> about the others), when i call the loseConnection method, it returns:
>>
>> twisted matrix exceptions.AttributeError: 'SerialPort' object has no
>> attribute '_tempDataBuffer'
>>
>> if i wrap the serialport class and put a :
>>
>> self._tempDataBuffer = ''
>>
>> in the __init__ method, i get:
>>
>> raise NotImplementedError("%s does not implement writeSomeData" %
>> exceptions.NotImplementedError: __main__.MySerialPort does not implement
>> writeSomeData
>>
>> however the port gets closed the right way.
>>
Can you provide a minimal example which demonstrates this behavior? It is
perhaps a bug in Twisted, but it is difficult to know without being able to
see *exactly* how the behavior is triggered.
Thanks,
Jean-Paul
More information about the Twisted-Python
mailing list