[v2,03/49] binman: Output errors to stderr

Message ID 20200613205717.v2.3.Iefb4cd15431a5849034edd4574a47f1f6a758fde@changeid
State Accepted
Commit de438550913b67765b71172e10e130452bc7f61f
Headers show
Series
  • rockchip: x86: Support building ROM files automatically with binman
Related show

Commit Message

Simon Glass June 14, 2020, 2:56 a.m.
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 at chromium.org>
---

Changes in v2:
- Add new binman patch to output errors to stderr

 tools/binman/main.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Bin Meng June 29, 2020, 6:21 a.m. | #1
On Sun, Jun 14, 2020 at 10:57 AM Simon Glass <sjg at chromium.org> wrote:
>
> 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 at chromium.org>
> ---
>
> Changes in v2:
> - Add new binman patch to output errors to stderr
>
>  tools/binman/main.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>

Reviewed-by: Bin Meng <bmeng.cn at gmail.com>

Patch

diff --git a/tools/binman/main.py b/tools/binman/main.py
index efa7fa8386..0ab2bb6206 100755
--- a/tools/binman/main.py
+++ b/tools/binman/main.py
@@ -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()