summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2015-12-09 12:02:56 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-12-14 23:13:06 +0000
commit5de3800c3081dfa3db55f80788eaeda6dd7d9f29 (patch)
tree99deea4ff4d725433aebfe49cbe03c378cb19317 /bitbake
parent0da1d71809b3248cc91f1d8f191ebf38fabc4439 (diff)
downloadpoky-5de3800c3081dfa3db55f80788eaeda6dd7d9f29.tar.gz
bitbake: 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] (Bitbake rev: 05695424b918fc81b16cbac70d79d8271a0b6045) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/event.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/bitbake/lib/bb/event.py b/bitbake/lib/bb/event.py
index 366bc41884..ec25ce77fb 100644
--- a/bitbake/lib/bb/event.py
+++ b/bitbake/lib/bb/event.py
@@ -595,6 +595,8 @@ class LogHandler(logging.Handler):
595 etype, value, tb = record.exc_info 595 etype, value, tb = record.exc_info
596 if hasattr(tb, 'tb_next'): 596 if hasattr(tb, 'tb_next'):
597 tb = list(bb.exceptions.extract_traceback(tb, context=3)) 597 tb = list(bb.exceptions.extract_traceback(tb, context=3))
598 # Need to turn the value into something the logging system can pickle
599 value = str(value)
598 record.bb_exc_info = (etype, value, tb) 600 record.bb_exc_info = (etype, value, tb)
599 record.exc_info = None 601 record.exc_info = None
600 fire(record, None) 602 fire(record, None)