tools/pyboard.py: Capture stdout for pts line.
The pts line printed by qemu-system-arm goes to stdout, not stderr. Redirect stderr to stdout in case other tools do print to stderr. Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
parent
a8d1c25a1b
commit
b095c097e6
1 changed files with 2 additions and 2 deletions
|
|
@ -235,9 +235,9 @@ class ProcessPtyToTerminal:
|
|||
preexec_fn=os.setsid,
|
||||
stdin=subprocess.PIPE,
|
||||
stdout=subprocess.PIPE,
|
||||
stderr=subprocess.PIPE,
|
||||
stderr=subprocess.STDOUT,
|
||||
)
|
||||
pty_line = self.subp.stderr.readline().decode("utf-8")
|
||||
pty_line = self.subp.stdout.readline().decode("utf-8")
|
||||
m = re.search(r"/dev/pts/[0-9]+", pty_line)
|
||||
if not m:
|
||||
print("Error: unable to find PTY device in startup line:", pty_line)
|
||||
|
|
|
|||
Loading…
Reference in a new issue