From: Antoine Pitrou Date: Sun, 11 May 2014 14:36:22 +0000 (+0200) Subject: Fix debugging output to work with -W X-Git-Tag: v3.5.0a1~1692 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ffd72737d321bac6fbdb4ca7c70615ae4c9de387;p=thirdparty%2FPython%2Fcpython.git Fix debugging output to work with -W --- diff --git a/Lib/test/test_cmd_line_script.py b/Lib/test/test_cmd_line_script.py index 5b6073e24b20..9a71fdb5ad33 100644 --- a/Lib/test/test_cmd_line_script.py +++ b/Lib/test/test_cmd_line_script.py @@ -188,8 +188,8 @@ class CmdLineTest(unittest.TestCase): while True: data = stderr.read(4) if support.verbose: - print("repl stderr[:4]:", repr(data)) - sys.stdout.flush() + print("repl stderr[:4]:", repr(data), file=sys.__stdout__) + sys.__stdout__.flush() if data == b">>> ": break stderr.readline()