I'm using twisted.internet.serialport to have my program be continuously connected to a device on a serial port.

Unfortunately my serial port is just a usb device, which means it can be disconnected or reset by the OS at any time *(port 2 disabled by hub (EMI?), re-enabling... )*. I see that pyserial has support for this for a few weeks and raises a SerialException.

What I would love to do is try to reconnect to the serial port that just disappeared every few seconds.

So, is there any way how I can tell twisted to notify me about a disconnect? Or should I go ahead and write a threaded wrapper for pyserial?

Thanks