summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bitbake/lib/bb/cooker.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index b2cf0cda17..2de6b3e0dd 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -44,6 +44,7 @@ import prserv.serv
44import pyinotify 44import pyinotify
45import json 45import json
46import pickle 46import pickle
47import codecs
47 48
48logger = logging.getLogger("BitBake") 49logger = logging.getLogger("BitBake")
49collectlog = logging.getLogger("BitBake.Collection") 50collectlog = logging.getLogger("BitBake.Collection")
@@ -143,7 +144,9 @@ class EventLogWriteHandler:
143 def write_event(self, event): 144 def write_event(self, event):
144 with open(self.eventfile, "a") as f: 145 with open(self.eventfile, "a") as f:
145 try: 146 try:
146 f.write("%s\n" % json.dumps({"class":event.__module__ + "." + event.__class__.__name__, "vars":json.dumps(pickle.dumps(event)) })) 147 str_event = codecs.encode(pickle.dumps(event), 'base64').decode('utf-8')
148 f.write("%s\n" % json.dumps({"class": event.__module__ + "." + event.__class__.__name__,
149 "vars": str_event}))
147 except Exception as e: 150 except Exception as e:
148 import traceback 151 import traceback
149 print(e, traceback.format_exc()) 152 print(e, traceback.format_exc())