summaryrefslogtreecommitdiffstats
path: root/lib/bb/event.py
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2010-01-19 09:56:25 +0000
committerRichard Purdie <rpurdie@linux.intel.com>2010-01-19 09:56:25 +0000
commit2778a69e31715ecb7a2fafc986d82d6f7df3074b (patch)
treee7c1216a05c0c4089f981ae03309f370d29db850 /lib/bb/event.py
parent45997fbe2a4630952f9632fdb44a067d3c3aafca (diff)
downloadbitbake-2778a69e31715ecb7a2fafc986d82d6f7df3074b.tar.gz
event.py: Convert to using pickle for events and isinstance in knotty UI handler
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'lib/bb/event.py')
-rw-r--r--lib/bb/event.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/bb/event.py b/lib/bb/event.py
index 14384159d..8b4222bfc 100644
--- a/lib/bb/event.py
+++ b/lib/bb/event.py
@@ -24,6 +24,7 @@ BitBake build tools.
import os, re
import bb.utils
+import pickle
# This is the pid for which we should generate the event. This is set when
# the runqueue forks off.
@@ -62,9 +63,11 @@ def fire(event, d):
errors = []
for h in _ui_handlers:
#print "Sending event %s" % event
- classid = "%s.%s" % (event.__class__.__module__, event.__class__.__name__)
try:
- _ui_handlers[h].event.send((classid, event))
+ # We use pickle here since it better handles object instances
+ # which xmlrpc's marshaller does not. Events *must* be serializable
+ # by pickle.
+ _ui_handlers[h].event.send((pickle.dumps(event)))
except:
errors.append(h)
for h in errors: