aboutsummaryrefslogtreecommitdiffstats
path: root/klippy
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2017-08-14 16:18:54 -0400
committerKevin O'Connor <kevin@koconnor.net>2017-08-14 21:07:26 -0400
commit085817d33252aa98b6bc232bb5ed12b5f77aebcb (patch)
treedef79335a2ff0438c65a8edfa29e69d48928c129 /klippy
parentf8bd8b97bea9273d166efdc06c3a6a54fc24ffdb (diff)
downloadkutter-085817d33252aa98b6bc232bb5ed12b5f77aebcb.tar.gz
kutter-085817d33252aa98b6bc232bb5ed12b5f77aebcb.tar.xz
kutter-085817d33252aa98b6bc232bb5ed12b5f77aebcb.zip
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>
Diffstat (limited to 'klippy')
-rw-r--r--klippy/serialhdl.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/klippy/serialhdl.py b/klippy/serialhdl.py
index 56952330..260ad708 100644
--- a/klippy/serialhdl.py
+++ b/klippy/serialhdl.py
@@ -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