summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/bb')
-rw-r--r--bitbake/lib/bb/event.py5
-rw-r--r--bitbake/lib/bb/server/none.py3
-rw-r--r--bitbake/lib/bb/ui/uievent.py2
3 files changed, 6 insertions, 4 deletions
diff --git a/bitbake/lib/bb/event.py b/bitbake/lib/bb/event.py
index cbe49fd699..4ff530fcb4 100644
--- a/bitbake/lib/bb/event.py
+++ b/bitbake/lib/bb/event.py
@@ -119,7 +119,10 @@ def fire_ui_handlers(event, d):
119 # We use pickle here since it better handles object instances 119 # We use pickle here since it better handles object instances
120 # which xmlrpc's marshaller does not. Events *must* be serializable 120 # which xmlrpc's marshaller does not. Events *must* be serializable
121 # by pickle. 121 # by pickle.
122 _ui_handlers[h].event.send((pickle.dumps(event))) 122 if hasattr(_ui_handlers[h].event, "sendpickle"):
123 _ui_handlers[h].event.sendpickle((pickle.dumps(event)))
124 else:
125 _ui_handlers[h].event.send(event)
123 except: 126 except:
124 errors.append(h) 127 errors.append(h)
125 for h in errors: 128 for h in errors:
diff --git a/bitbake/lib/bb/server/none.py b/bitbake/lib/bb/server/none.py
index 6083631fe7..3be7b1daf6 100644
--- a/bitbake/lib/bb/server/none.py
+++ b/bitbake/lib/bb/server/none.py
@@ -28,7 +28,6 @@
28 28
29import time 29import time
30import bb 30import bb
31import pickle
32import signal 31import signal
33 32
34DEBUG = False 33DEBUG = False
@@ -68,7 +67,7 @@ class BBUIEventQueue:
68 self.parent = parent 67 self.parent = parent
69 @staticmethod 68 @staticmethod
70 def send(event): 69 def send(event):
71 bb.server.none.eventQueue.append(pickle.loads(event)) 70 bb.server.none.eventQueue.append(event)
72 @staticmethod 71 @staticmethod
73 def quit(): 72 def quit():
74 return 73 return
diff --git a/bitbake/lib/bb/ui/uievent.py b/bitbake/lib/bb/ui/uievent.py
index 2fef4e4659..0e738174e7 100644
--- a/bitbake/lib/bb/ui/uievent.py
+++ b/bitbake/lib/bb/ui/uievent.py
@@ -76,7 +76,7 @@ class BBUIEventQueue:
76 self.host, self.port = server.socket.getsockname() 76 self.host, self.port = server.socket.getsockname()
77 77
78 server.register_function( self.system_quit, "event.quit" ) 78 server.register_function( self.system_quit, "event.quit" )
79 server.register_function( self.send_event, "event.send" ) 79 server.register_function( self.send_event, "event.sendpickle" )
80 server.socket.settimeout(1) 80 server.socket.settimeout(1)
81 81
82 self.EventHandle = self.BBServer.registerEventHandler(self.host, self.port) 82 self.EventHandle = self.BBServer.registerEventHandler(self.host, self.port)