From ccee189f99f8d62660051af1a3d8e997035f76d3 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Sun, 31 Oct 2021 13:43:11 -0400 Subject: [PATCH] palette2: Use regular str() types for input on Python2 Avoid using unicode() types on Python2 as it can lead to subtle errors. Signed-off-by: Kevin O'Connor --- klippy/extras/palette2.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/klippy/extras/palette2.py b/klippy/extras/palette2.py index c756b415..93bb4da9 100644 --- a/klippy/extras/palette2.py +++ b/klippy/extras/palette2.py @@ -544,7 +544,7 @@ class Palette2: self.cmd_Disconnect() return self.reactor.NEVER if len(raw_bytes): - text_buffer = self.read_buffer + raw_bytes.decode() + text_buffer = self.read_buffer + str(raw_bytes.decode()) while True: i = text_buffer.find("\n") if i >= 0: