diff options
author | Chris Larson <chris_larson@mentor.com> | 2010-06-16 10:15:08 -0700 |
---|---|---|
committer | Chris Larson <chris_larson@mentor.com> | 2010-06-16 10:17:15 -0700 |
commit | 07757a1bf1129cc6a967a7cf1815d3d46a6bbdcf (patch) | |
tree | eea3a4ab9103b32cb8352fa4f3a62dbe601b1892 /bin | |
parent | 1a04610dea376340b9ea4c109f64995b4fd6ad02 (diff) | |
download | bitbake-07757a1bf1129cc6a967a7cf1815d3d46a6bbdcf.tar.gz |
Resurrect the excepthook, this time just sending the info with bb.fatal
Signed-off-by: Chris Larson <chris_larson@mentor.com>
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/bitbake | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/bin/bitbake b/bin/bitbake index e824ad256..028e2066a 100755 --- a/bin/bitbake +++ b/bin/bitbake @@ -29,6 +29,7 @@ sys.path.insert(0, os.path.join(os.path.dirname(os.path.dirname(sys.argv[0])), import optparse import warnings +from traceback import format_exception import bb import bb.msg from bb import cooker @@ -55,6 +56,13 @@ class BBConfiguration(object): self.pkgs_to_build = [] +def print_exception(exc, value, tb): + """Send exception information through bb.msg""" + bb.fatal("".join(format_exception(exc, value, tb))) + +sys.excepthook = print_exception + + _warnings_showwarning = warnings.showwarning def _showwarning(message, category, filename, lineno, file=None, line=None): """Display python warning messages using bb.msg""" |