From fa9697aa0589928dc11351356460d48e96fc6754 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Mon, 20 May 2013 23:00:10 +0100 Subject: [PATCH] bitbake: bin/bitbake: Improve exception handling Due to the internal event processing, this excepting handler usually raises an Empty error, masking the underlying failure. Ensure the original exception is raised. (Bitbake rev: 7d548568a55adfe84a976f2a549995e42da1afef) Signed-off-by: Richard Purdie --- bitbake/bin/bitbake | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bitbake/bin/bitbake b/bitbake/bin/bitbake index 0ca82e5..5b9294b 100755 --- a/bitbake/bin/bitbake +++ b/bitbake/bin/bitbake @@ -250,7 +250,8 @@ Default BBFILES are the .bb files in the current directory.""") server.addcooker(cooker) server.saveConnectionDetails() - except: + except Exception as e: + exc_info = sys.exc_info() while True: try: import queue @@ -262,7 +263,7 @@ Default BBFILES are the .bb files in the current directory.""") break if isinstance(event, logging.LogRecord): logger.handle(event) - raise + raise exc_info[1], None, exc_info[2] server.detach() # Should no longer need to ever reference cooker -- 2.7.4