From 7d548568a55adfe84a976f2a549995e42da1afef Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Mon, 20 May 2013 23:00:10 +0100 Subject: 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. Signed-off-by: Richard Purdie --- bin/bitbake | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'bin/bitbake') diff --git a/bin/bitbake b/bin/bitbake index 0ca82e5a7..5b9294bf4 100755 --- a/bin/bitbake +++ b/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 -- cgit 1.2.3-korg