mirror of https://github.com/Desuuuu/klipper.git
serialhdl: Improve Python3 compatibility
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
a4f7ad9ffc
commit
1f4c52e7db
|
@ -91,7 +91,7 @@ class SerialReader:
|
||||||
self.ser.rts = self.rts
|
self.ser.rts = self.rts
|
||||||
self.ser.open()
|
self.ser.open()
|
||||||
else:
|
else:
|
||||||
self.ser = open(self.serialport, 'rb+')
|
self.ser = open(self.serialport, 'rb+', buffering=0)
|
||||||
except (OSError, IOError, 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(connect_time + 5.)
|
self.reactor.pause(connect_time + 5.)
|
||||||
|
|
Loading…
Reference in New Issue