diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2021-10-31 13:40:11 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2021-10-31 13:52:31 -0400 |
commit | 7a6fd1a1aa1ad39a401887619c33cb49e55adfea (patch) | |
tree | ef6d024457fb9ca8a07d41c33ca90974ae687cc1 /klippy/console.py | |
parent | d6c3aaad8af18e792ce7cfad720138dc26c782bd (diff) | |
download | kutter-7a6fd1a1aa1ad39a401887619c33cb49e55adfea.tar.gz kutter-7a6fd1a1aa1ad39a401887619c33cb49e55adfea.tar.xz kutter-7a6fd1a1aa1ad39a401887619c33cb49e55adfea.zip |
console: Use regular str() types for commands on Python2
Avoid using unicode() types on Python2 as it can lead to subtle
errors.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/console.py')
-rwxr-xr-x | klippy/console.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/klippy/console.py b/klippy/console.py index b3075912..bb91a883 100755 --- a/klippy/console.py +++ b/klippy/console.py @@ -187,7 +187,7 @@ class KeyboardReader: return None return line def process_kbd(self, eventtime): - self.data += os.read(self.fd, 4096).decode() + self.data += str(os.read(self.fd, 4096).decode()) kbdlines = self.data.split('\n') for line in kbdlines[:-1]: |