From e08b71592e8545a0d0c8d5ec31a55d3460383c31 Mon Sep 17 00:00:00 2001 From: ridiculousfish Date: Fri, 29 Oct 2021 20:45:42 -0700 Subject: [PATCH] pexpect_helper to unconditionally output to the tty With the new test runner, pexpect_helper no longer sees a tty so wasn't outputting the buffer. Just always do it. --- build_tools/pexpect_helper.py | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/build_tools/pexpect_helper.py b/build_tools/pexpect_helper.py index d65198aa3..4eda5be3c 100644 --- a/build_tools/pexpect_helper.py +++ b/build_tools/pexpect_helper.py @@ -268,16 +268,11 @@ class SpawnedProc(object): print("{CYAN}Escaped buffer:{RESET}".format(**colors)) print(escape(self.spawn.before)) print("") - if sys.stdout.isatty(): - print( - "{CYAN}When written to the tty, this looks like:{RESET}".format( - **colors - ) - ) - print("{CYAN}<-------{RESET}".format(**colors)) - sys.stdout.write(self.spawn.before) - sys.stdout.flush() - print("{RESET}\n{CYAN}------->{RESET}".format(**colors)) + print("{CYAN}When written to the tty, this looks like:{RESET}".format(**colors)) + print("{CYAN}<-------{RESET}".format(**colors)) + sys.stdout.write(self.spawn.before) + sys.stdout.flush() + print("{RESET}\n{CYAN}------->{RESET}".format(**colors)) print("")