summaryrefslogtreecommitdiffstats
path: root/bitbake/bin
diff options
context:
space:
mode:
authorChris Larson <chris_larson@mentor.com>2010-06-16 10:15:08 -0700
committerRichard Purdie <rpurdie@linux.intel.com>2010-07-02 15:41:36 +0100
commitce42c24d700e6f61dc51942631587d8ae07b12ea (patch)
tree0fce9517d33f67f46984d4bd68059a593b40d39b /bitbake/bin
parent6c338660e8a5efec3baa30a23eeb9662b09a863d (diff)
downloadpoky-ce42c24d700e6f61dc51942631587d8ae07b12ea.tar.gz
Resurrect the excepthook, this time just sending the info with bb.fatal
(Bitbake rev: 07757a1bf1129cc6a967a7cf1815d3d46a6bbdcf) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'bitbake/bin')
-rwxr-xr-xbitbake/bin/bitbake8
1 files changed, 8 insertions, 0 deletions
diff --git a/bitbake/bin/bitbake b/bitbake/bin/bitbake
index c0eb713f55..518a38ab81 100755
--- a/bitbake/bin/bitbake
+++ b/bitbake/bin/bitbake
@@ -29,6 +29,7 @@ sys.path.insert(0, os.path.join(os.path.dirname(os.path.dirname(sys.argv[0])),
29 29
30import optparse 30import optparse
31import warnings 31import warnings
32from traceback import format_exception
32import bb 33import bb
33import bb.msg 34import bb.msg
34from bb import cooker 35from bb import cooker
@@ -55,6 +56,13 @@ class BBConfiguration(object):
55 self.pkgs_to_build = [] 56 self.pkgs_to_build = []
56 57
57 58
59def print_exception(exc, value, tb):
60 """Send exception information through bb.msg"""
61 bb.fatal("".join(format_exception(exc, value, tb)))
62
63sys.excepthook = print_exception
64
65
58_warnings_showwarning = warnings.showwarning 66_warnings_showwarning = warnings.showwarning
59def _showwarning(message, category, filename, lineno, file=None, line=None): 67def _showwarning(message, category, filename, lineno, file=None, line=None):
60 """Display python warning messages using bb.msg""" 68 """Display python warning messages using bb.msg"""