Patchwork [bitbake-devel] bitbake: bb.fatal: Raise a BBHandledException instead of exiting

login
register
mail settings
Submitter Richard Purdie
Date May 30, 2014, 2:57 p.m.
Message ID <1401461870.31309.54.camel@ted>
Download mbox | patch
Permalink /patch/73019/
State New
Headers show

Comments

Richard Purdie - May 30, 2014, 2:57 p.m.
With new bitbake UIs having the cooker exit at 'random' points
in the codebase is problematic. This patch raises an exception
which matches the situation instead.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>

Patch

diff --git a/bitbake/lib/bb/__init__.py b/bitbake/lib/bb/__init__.py
index 1478dd2..84f6ec3 100644
--- a/bitbake/lib/bb/__init__.py
+++ b/bitbake/lib/bb/__init__.py
@@ -99,8 +99,7 @@  def error(*args):
 
 def fatal(*args):
     logger.critical(''.join(args))
-    sys.exit(1)
-
+    raise BBHandledException()
 
 def deprecated(func, name=None, advice=""):
     """This is a decorator which can be used to mark functions