diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-12-09 12:02:56 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-12-14 23:07:13 +0000 |
commit | 05695424b918fc81b16cbac70d79d8271a0b6045 (patch) | |
tree | d186c5903ce1696de52334468f4c54ca24ef69bb /lib/bb/event.py | |
parent | 16bfd3e3d145705a2b3a05648ddbcacc7a338dfa (diff) | |
download | bitbake-contrib-05695424b918fc81b16cbac70d79d8271a0b6045.tar.gz |
event: Fix subprocess event error traceback failures
If subprocess raises a CalledProcessError() error, e.g. from a call
like subprocess.check_call("false"), bitbake would try and pass the
object over IPC and fail, leading to an unusual error:
('__init__() takes at least 3 arguments (1 given)', <class 'subprocess.CalledProcessError'>, ())%
To avoid this, we turn the value into a string which prevents the
issues the IPC has trying to deal with the object (for the same reason
we deal with tracebacks here too).
[YOCTO #8752]
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/event.py')
-rw-r--r-- | lib/bb/event.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/bb/event.py b/lib/bb/event.py index 366bc4188..ec25ce77f 100644 --- a/lib/bb/event.py +++ b/lib/bb/event.py @@ -595,6 +595,8 @@ class LogHandler(logging.Handler): etype, value, tb = record.exc_info 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.exc_info = None fire(record, None) |