aboutsummaryrefslogtreecommitdiffstats
path: root/bitbake/bin
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2016-07-06 12:00:31 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-07-08 09:57:28 +0100
commit70cc20daef087b2dd1567168c9091be0476fefc8 (patch)
tree9d764f7db7e0c1fac4828909fd11d3210cb45d84 /bitbake/bin
parent2199ff5ce69d8b90dff8306ffe8f0f5693b39645 (diff)
downloadopenembedded-core-contrib-70cc20daef087b2dd1567168c9091be0476fefc8.tar.gz
bitbake: eventreplay: fix event loading code
Event objects are represented by base64-encoded strings in the event file and can't be loaded by existing eventreplay code. Fixed the code of loading events from file by decoding base64 strings into the binary form and loading them with pickle.load. [YOCTO #9585] (Bitbake rev: a55c280c167f84caed6518119246e5a55f56cfd4) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/bin')
-rwxr-xr-xbitbake/bin/toaster-eventreplay4
1 files changed, 3 insertions, 1 deletions
diff --git a/bitbake/bin/toaster-eventreplay b/bitbake/bin/toaster-eventreplay
index 03b5dde938..a1072988ac 100755
--- a/bitbake/bin/toaster-eventreplay
+++ b/bitbake/bin/toaster-eventreplay
@@ -29,6 +29,7 @@
from __future__ import print_function
import os
import sys, logging
+import codecs
# mangle syspath to allow easy import of modules
sys.path.insert(0, os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))),
@@ -117,7 +118,8 @@ class FileReadEventsServerConnection():
try:
event_data = json.loads(line.strip())
event_class = _import_class(event_data['class'])
- event_object = pickle.loads(json.loads(event_data['vars']))
+ event_str = event_data['vars'].encode('utf-8')
+ event_object = pickle.loads(codecs.decode(event_str, 'base64'))
except ValueError as e:
print("Failed loading ", line)
raise e