From 88a257634a7a681d711e4401a7109d8742e9a166 Mon Sep 17 00:00:00 2001 From: Chris Larson Date: Wed, 9 Jun 2010 19:26:21 -0700 Subject: Show a traceback when a task fails due to an exception (Bitbake rev: 5bb24832761bd518cb0249125f67939e0cbd0998) Signed-off-by: Chris Larson Signed-off-by: Richard Purdie --- bitbake/lib/bb/runqueue.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'bitbake/lib') diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py index a73e0c4a6a..93fff5d27b 100644 --- a/bitbake/lib/bb/runqueue.py +++ b/bitbake/lib/bb/runqueue.py @@ -981,10 +981,11 @@ class RunQueue: try: self.cooker.tryBuild(fn, taskname[3:]) except bb.build.EventException: - bb.msg.error(bb.msg.domain.Build, "Build of " + fn + " " + taskname + " failed") os._exit(1) - except: - bb.msg.error(bb.msg.domain.Build, "Build of " + fn + " " + taskname + " failed") + except Exception: + from traceback import format_exc + bb.msg.error(bb.msg.domain.Build, "Build of %s %s failed" % (fn, taskname)) + bb.msg.error(bb.msg.domain.Build, format_exc()) os._exit(1) os._exit(0) -- cgit v1.2.3