mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-07-25 07:34:05 -06:00
serialhdl: Use regular str() type for stats on Python2
Avoid using unicode() types on Python2 as it can lead to subtle errors. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
fc5353364a
commit
1dee974aea
1 changed files with 3 additions and 3 deletions
|
@ -218,9 +218,9 @@ class SerialReader:
|
||||||
def stats(self, eventtime):
|
def stats(self, eventtime):
|
||||||
if self.serialqueue is None:
|
if self.serialqueue is None:
|
||||||
return ""
|
return ""
|
||||||
self.ffi_lib.serialqueue_get_stats(
|
self.ffi_lib.serialqueue_get_stats(self.serialqueue,
|
||||||
self.serialqueue, self.stats_buf, len(self.stats_buf))
|
self.stats_buf, len(self.stats_buf))
|
||||||
return self.ffi_main.string(self.stats_buf).decode()
|
return str(self.ffi_main.string(self.stats_buf).decode())
|
||||||
def get_reactor(self):
|
def get_reactor(self):
|
||||||
return self.reactor
|
return self.reactor
|
||||||
def get_msgparser(self):
|
def get_msgparser(self):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue