diff options
author | Damien George <damien@micropython.org> | 2024-08-09 13:54:33 +1000 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2024-08-28 11:23:11 +1000 |
commit | b095c097e6cc49de6ba51f4d2ba43258f7f69d1b (patch) | |
tree | 26a9df381c769ed85ab87101a1aa12ea3460d505 /tools/pyboard.py | |
parent | a8d1c25a1b32759642f98e994800b39457ec6add (diff) | |
download | micropython-b095c097e6cc49de6ba51f4d2ba43258f7f69d1b.tar.gz micropython-b095c097e6cc49de6ba51f4d2ba43258f7f69d1b.zip |
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>
Diffstat (limited to 'tools/pyboard.py')
-rwxr-xr-x | tools/pyboard.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/pyboard.py b/tools/pyboard.py index c422b64ac5..55cbe8384d 100755 --- a/tools/pyboard.py +++ b/tools/pyboard.py @@ -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) |