diff mbox series

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

Message ID 20230310204519.706973-2-Martin.Jansa@gmail.com
State New
Headers show
Series [2.2,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 8a354fed7..3555585c8 100644
--- a/lib/bb/cookerdata.py
+++ b/lib/bb/cookerdata.py
@@ -436,7 +436,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()))