From 1f4c52e7db2ff5a1ea7296022fcbdcc8bc3d714c Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Tue, 1 Dec 2020 12:40:13 -0500 Subject: [PATCH] serialhdl: Improve Python3 compatibility Signed-off-by: Kevin O'Connor --- klippy/serialhdl.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/klippy/serialhdl.py b/klippy/serialhdl.py index 9f5c2863..e9c645d0 100644 --- a/klippy/serialhdl.py +++ b/klippy/serialhdl.py @@ -91,7 +91,7 @@ class SerialReader: self.ser.rts = self.rts self.ser.open() else: - self.ser = open(self.serialport, 'rb+') + self.ser = open(self.serialport, 'rb+', buffering=0) except (OSError, IOError, serial.SerialException) as e: logging.warn("Unable to open port: %s", e) self.reactor.pause(connect_time + 5.)