From 38fdb4cb35e9260a6aa78ffcfa68d39bfc3523de Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 9 Jul 2020 18:39:39 -0600 Subject: 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 Reviewed-by: Bin Meng --- tools/patman/tout.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'tools/patman/tout.py') diff --git a/tools/patman/tout.py b/tools/patman/tout.py index c7e32720965..91a53f4073d 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. -- cgit v1.2.3