diff mbox series

cookerdata: Remove incorrect SystemExit usage

Message ID 20230217150134.349184-1-richard.purdie@linuxfoundation.org
State Accepted, archived
Commit aaefb43b41a0d9b16a59643136268eb6e5d48cd2
Headers show
Series cookerdata: Remove incorrect SystemExit usage | expand

Commit Message

Richard Purdie Feb. 17, 2023, 3:01 p.m. UTC
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 1658bee93c..d93760c1c1 100644
--- a/lib/bb/cookerdata.py
+++ b/lib/bb/cookerdata.py
@@ -473,7 +473,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()))