Commit b095c097 authored by Damien George's avatar Damien George

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: default avatarDamien George <damien@micropython.org>
parent a8d1c25a
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment