binman: Output errors to stderr
authorSimon Glass <sjg@chromium.org>
Fri, 10 Jul 2020 00:39:26 +0000 (18:39 -0600)
committerSimon Glass <sjg@chromium.org>
Sat, 25 Jul 2020 01:25:15 +0000 (19:25 -0600)
At present binman outputs errors to stdout which means that fails are
effectively silent when printed by buildman, for example. Fix this by
outputing errors to stderr.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
tools/binman/main.py

index efa7fa8..0ab2bb6 100755 (executable)
@@ -123,7 +123,7 @@ def RunBinman(args):
         try:
             ret_code = control.Binman(args)
         except Exception as e:
-            print('binman: %s' % e)
+            print('binman: %s' % e, file=sys.stderr)
             if args.debug:
                 print()
                 traceback.print_exc()