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
|
@ -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…
Reference in New Issue