aboutsummaryrefslogtreecommitdiff
path: root/tools/patman/tout.py
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-07-09 18:39:39 -0600
committerSimon Glass <sjg@chromium.org>2020-07-20 11:37:47 -0600
commitf9793a12c5e76c50018d516cbaa011ac86c285fa (patch)
tree519b138d6392970401df8e8d790d0d8646880409 /tools/patman/tout.py
parent5f850fb9a62659edaa81167a4acc879c0ea104fc (diff)
downloadu-boot-f9793a12c5e76c50018d516cbaa011ac86c285fa.zip
u-boot-f9793a12c5e76c50018d516cbaa011ac86c285fa.tar.gz
u-boot-f9793a12c5e76c50018d516cbaa011ac86c285fa.tar.bz2
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>
Diffstat (limited to 'tools/patman/tout.py')
-rw-r--r--tools/patman/tout.py5
1 files changed, 4 insertions, 1 deletions
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 @@ def _Output(level, msg, color=None):
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.