diff options
Diffstat (limited to 'bitbake/lib/bb/event.py')
-rw-r--r-- | bitbake/lib/bb/event.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/bitbake/lib/bb/event.py b/bitbake/lib/bb/event.py index 4ff530fcb4..a3288b619b 100644 --- a/bitbake/lib/bb/event.py +++ b/bitbake/lib/bb/event.py | |||
@@ -30,6 +30,7 @@ except ImportError: | |||
30 | import pickle | 30 | import pickle |
31 | import logging | 31 | import logging |
32 | import atexit | 32 | import atexit |
33 | import traceback | ||
33 | import bb.utils | 34 | import bb.utils |
34 | 35 | ||
35 | # This is the pid for which we should generate the event. This is set when | 36 | # This is the pid for which we should generate the event. This is set when |
@@ -423,6 +424,12 @@ class LogHandler(logging.Handler): | |||
423 | """Dispatch logging messages as bitbake events""" | 424 | """Dispatch logging messages as bitbake events""" |
424 | 425 | ||
425 | def emit(self, record): | 426 | def emit(self, record): |
427 | if record.exc_info: | ||
428 | etype, value, tb = record.exc_info | ||
429 | if hasattr(tb, 'tb_next'): | ||
430 | tb = list(bb.exceptions.extract_traceback(tb, context=3)) | ||
431 | record.bb_exc_info = (etype, value, tb) | ||
432 | record.exc_info = None | ||
426 | fire(record, None) | 433 | fire(record, None) |
427 | 434 | ||
428 | def filter(self, record): | 435 | def filter(self, record): |