summaryrefslogtreecommitdiff
path: root/bitbake
diff options
context:
space:
mode:
authorChris Larson <chris_larson@mentor.com>2010-12-10 10:51:47 -0500
committerRichard Purdie <rpurdie@linux.intel.com>2011-01-04 14:46:48 +0000
commit3d3af810fa5c049b23bba1069f1653aef5fe361f (patch)
tree34ea720b2a41e39974fc826aca84810cc2d5ebf5 /bitbake
parent6f80455777c9d26c3af250904f455cb2bb1fc75a (diff)
downloadopenembedded-core-3d3af810fa5c049b23bba1069f1653aef5fe361f.tar.gz
openembedded-core-3d3af810fa5c049b23bba1069f1653aef5fe361f.tar.bz2
openembedded-core-3d3af810fa5c049b23bba1069f1653aef5fe361f.zip
Kill the uncaught exception handler
We now wrap the main() in a try/except, ensuring that both the main portion of bin/bitbake and the UI raising an exception will be shown to the user. For the server and workers, we can ensure in the server itself that exceptions are handled correctly. (Bitbake rev: 240d4a7ae80a6636c302ae84266ddfed7a7fcedd) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'bitbake')
-rwxr-xr-xbitbake/bin/bitbake18
1 files changed, 6 insertions, 12 deletions
diff --git a/bitbake/bin/bitbake b/bitbake/bin/bitbake
index 51cb87e285..9b68c23a9b 100755
--- a/bitbake/bin/bitbake
+++ b/bitbake/bin/bitbake
@@ -57,17 +57,6 @@ class BBConfiguration(object):
self.pkgs_to_build = []
-def print_exception(*exc_info):
- if not isinstance(exc_info[0], SystemExit):
- if isinstance(exc_info[0], KeyboardInterrupt):
- logger.error("User aborted.")
- else:
- logger.error("Uncaught exception: ", exc_info=exc_info)
- sys.exit(1)
-
-sys.excepthook = print_exception
-
-
# Display bitbake/OE warnings via the BitBake.Warnings logger, ignoring others"""
warnlog = logging.getLogger("BitBake.Warnings")
_warnings_showwarning = warnings.showwarning
@@ -216,5 +205,10 @@ Default BBFILES are the .bb files in the current directory.""")
server_connection.terminate()
if __name__ == "__main__":
- ret = main()
+ try:
+ ret = main()
+ except Exception:
+ ret = 1
+ import traceback
+ traceback.print_exc(5)
sys.exit(ret)