From: Simon Glass <sjg@chromium.org>
Date: Sat, 20 Jul 2019 18:23:26 +0000 (-0600)
Subject: binman: Use print() to print output
X-Git-Tag: v2025.01-rc5-pxa1908~2857^2~50
X-Git-Url: http://git.dujemihanovic.xyz/img/static/html/index.html?a=commitdiff_plain;h=7b773167c083752eabf88bd37d55976244a48f6c;p=u-boot.git

binman: Use print() to print output

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>
---

diff --git a/tools/patman/tout.py b/tools/patman/tout.py
index 15acce28cb..ae04c30f1d 100644
--- a/tools/patman/tout.py
+++ b/tools/patman/tout.py
@@ -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.