patman: Update errors and warnings to use stderr
When warnings and errors are produced by tools they should be written to
stderr. Update the tout implementation to handle this.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
diff --git a/tools/patman/tout.py b/tools/patman/tout.py
index c7e3272..91a53f4 100644
--- a/tools/patman/tout.py
+++ b/tools/patman/tout.py
@@ -83,7 +83,10 @@
ClearProgress()
if color:
msg = _color.Color(color, msg)
- print(msg)
+ if level < NOTICE:
+ print(msg, file=sys.stderr)
+ else:
+ print(msg)
def DoOutput(level, msg):
"""Output a message to the terminal.