diff mbox series

[2.0,2/4] cookerdata: Remove incorrect SystemExit usage

Message ID 20230310204601.730833-2-Martin.Jansa@gmail.com
State Accepted, archived
Commit b9ae7164d9e744e8eb9aaff79218f57233a449b7
Headers show
Series [2.0,1/4] utils: Allow to_boolean to support int values | expand

Commit Message

Martin Jansa March 10, 2023, 8:45 p.m. UTC
From: Richard Purdie <richard.purdie@linuxfoundation.org>

Calling SystemExit doesn't work well with server/client usage since the string
isn't printed to the right place. Use bb.fatal() instead which prints the right
log output and raises and handled exception which then shows correctly on the
UI.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 lib/bb/cookerdata.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/lib/bb/cookerdata.py b/lib/bb/cookerdata.py
index fe5696c70..efa671aa0 100644
--- a/lib/bb/cookerdata.py
+++ b/lib/bb/cookerdata.py
@@ -435,7 +435,7 @@  class CookerDataBuilder(object):
                 msg += (" and bitbake did not find a conf/bblayers.conf file in"
                         " the expected location.\nMaybe you accidentally"
                         " invoked bitbake from the wrong directory?")
-            raise SystemExit(msg)
+            bb.fatal(msg)
 
         if not data.getVar("TOPDIR"):
             data.setVar("TOPDIR", os.path.abspath(os.getcwd()))