diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-05-12 08:05:32 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-05-12 23:01:03 +0100 |
commit | d7db75020ed727677afbad07a90fb3eac0bf2c45 (patch) | |
tree | dda2aa90e6184203491cb86fcba71e2b4a152a4b /lib/bb/event.py | |
parent | ca8c91acc9396385834b266d4e8b84d917e5e298 (diff) | |
download | bitbake-d7db75020ed727677afbad07a90fb3eac0bf2c45.tar.gz |
event/msg: Pass formatted exceptions
python3 can't cope with the previous approach we were using to pass
exceptions through the RPC. Avoid this by creating a formatted exception
on the sender side.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/event.py')
-rw-r--r-- | lib/bb/event.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/bb/event.py b/lib/bb/event.py index 5a03a31f4..29b14f6c3 100644 --- a/lib/bb/event.py +++ b/lib/bb/event.py @@ -610,8 +610,9 @@ class LogHandler(logging.Handler): if hasattr(tb, 'tb_next'): tb = list(bb.exceptions.extract_traceback(tb, context=3)) # Need to turn the value into something the logging system can pickle - value = str(value) record.bb_exc_info = (etype, value, tb) + record.bb_exc_formatted = bb.exceptions.format_exception(etype, value, tb, limit=5) + value = str(value) record.exc_info = None fire(record, None) |