binman: Use print() to print output
authorSimon Glass <sjg@chromium.org>
Sat, 20 Jul 2019 18:23:26 +0000 (12:23 -0600)
committerSimon Glass <sjg@chromium.org>
Mon, 29 Jul 2019 15:38:05 +0000 (09:38 -0600)
At present tout writes directly to stdout. This is not necessary and it
prevents tests from redirecting output. Change it to use print() for the
non-progress output.

Signed-off-by: Simon Glass <sjg@chromium.org>
tools/patman/tout.py

index 15acce28cb98c59bda37b7cc82a54879ec7330ec..ae04c30f1db637c12ddf8684f160b76d7e5dedf5 100644 (file)
@@ -4,6 +4,8 @@
 # Terminal output logging.
 #
 
+from __future__ import print_function
+
 import sys
 
 import terminal
@@ -87,7 +89,7 @@ def _Output(level, msg, color=None):
         ClearProgress()
         if color:
             msg = _color.Color(color, msg)
-        _stdout.write(msg + '\n')
+        print(msg)
 
 def DoOutput(level, msg):
     """Output a message to the terminal.