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:
Kevin O'Connor 2017-08-14 16:18:54 -04:00
parent f8bd8b97be
commit 085817d332
1 changed files with 1 additions and 1 deletions

View File

@ -71,7 +71,7 @@ class SerialReader:
self.serialport, self.baud, timeout=0)
else:
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,))
self.reactor.pause(starttime + 5.)
continue