klippy: Use newer "except XYZError as e" python syntax

Use the newer syntax for python exceptions.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor
2017-06-09 23:32:49 -04:00
parent d093200966
commit 1bc3e0a678
6 changed files with 15 additions and 15 deletions

View File

@@ -69,7 +69,7 @@ class SerialReader:
self.serialport, self.baud, timeout=0)
else:
self.ser = open(self.serialport, 'rb+')
except (OSError, serial.SerialException), e:
except (OSError, serial.SerialException) as e:
logging.warn("Unable to open port: %s" % (e,))
self.reactor.pause(starttime + 5.)
continue