mirror of
https://git.rtems.org/rtems-tools/
synced 2025-10-25 06:12:40 +08:00
python: Provide support to select a valid python version.
- Update imports after wrapping the code. - Fix python3 issues. - Fix config path issues for in repo and install runs. Closes #3537
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user