diff options
Diffstat (limited to 'tester/rt/console.py')
-rw-r--r-- | tester/rt/console.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tester/rt/console.py b/tester/rt/console.py index 0545ace..ef35a0e 100644 --- a/tester/rt/console.py +++ b/tester/rt/console.py @@ -41,13 +41,13 @@ import time from rtemstoolkit import path -from . import telnet +import telnet # # Not available on Windows. Not sure what this means. # if os.name != 'nt': - from . import stty + import stty else: stty = None @@ -107,6 +107,9 @@ class tty(console): time.sleep(0.05) try: data = me.tty.read() + if isinstance(data, bytes): + data = data.decode('utf-8', 'ignore') + data = [c for c in data if ord(c) < 128] except IOError as ioe: if ioe.errno == errno.EAGAIN: continue |