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:
@@ -235,9 +235,9 @@ class ProcessPtyToTerminal:
|
|||||||
preexec_fn=os.setsid,
|
preexec_fn=os.setsid,
|
||||||
stdin=subprocess.PIPE,
|
stdin=subprocess.PIPE,
|
||||||
stdout=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)
|
m = re.search(r"/dev/pts/[0-9]+", pty_line)
|
||||||
if not m:
|
if not m:
|
||||||
print("Error: unable to find PTY device in startup line:", pty_line)
|
print("Error: unable to find PTY device in startup line:", pty_line)
|
||||||
|
|||||||
Reference in New Issue
Block a user