serialhdl: Sometimes we get an IOError when serial port not found
Catch IOError when opening the serial port. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
f8bd8b97be
commit
085817d332
|
@ -71,7 +71,7 @@ class SerialReader:
|
||||||
self.serialport, self.baud, timeout=0)
|
self.serialport, self.baud, timeout=0)
|
||||||
else:
|
else:
|
||||||
self.ser = open(self.serialport, 'rb+')
|
self.ser = open(self.serialport, 'rb+')
|
||||||
except (OSError, serial.SerialException) as e:
|
except (OSError, IOError, serial.SerialException) as e:
|
||||||
logging.warn("Unable to open port: %s" % (e,))
|
logging.warn("Unable to open port: %s" % (e,))
|
||||||
self.reactor.pause(starttime + 5.)
|
self.reactor.pause(starttime + 5.)
|
||||||
continue
|
continue
|
||||||
|
|
Loading…
Reference in New Issue