[bitbake-devel] [PATCH 2/2] bb.build: in _exec_task, catch BBHandledException

Christopher Larson kergoth at gmail.com
Thu Sep 15 21:15:47 UTC 2016


From: Christopher Larson <chris_larson at mentor.com>

We don't want a traceback for this exception, we need to catch it, fire
TaskFailed, and return failure.

Signed-off-by: Christopher Larson <chris_larson at mentor.com>
---
 lib/bb/build.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lib/bb/build.py b/lib/bb/build.py
index 28401b3..8581e72 100644
--- a/lib/bb/build.py
+++ b/lib/bb/build.py
@@ -575,6 +575,9 @@ def _exec_task(fn, task, d, quieterr):
             logger.error(str(exc))
             event.fire(TaskFailed(task, logfn, localdata, errprinted), localdata)
         return 1
+    except bb.BBHandledException:
+        event.fire(TaskFailed(task, logfn, localdata, True), localdata)
+        return 1
     finally:
         sys.stdout.flush()
         sys.stderr.flush()
-- 
2.8.0




More information about the bitbake-devel mailing list