diff mbox series

[U-Boot,04/53] binman: Use print() to print output

Message ID 20190720182416.183626-5-sjg@chromium.org
State Accepted
Commit 7b773167c083752eabf88bd37d55976244a48f6c
Delegated to: Simon Glass
Headers show
Series binman: Support replacing entries in an existing image | expand

Commit Message

Simon Glass July 20, 2019, 6:23 p.m. UTC
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 | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Simon Glass July 29, 2019, 9:22 p.m. UTC | #1
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 | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Applied to u-boot-dm, thanks!
diff mbox series

Patch

diff --git a/tools/patman/tout.py b/tools/patman/tout.py
index 15acce28cb9..ae04c30f1db 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.