bitbake: uievent: improve BBUIEventQueue code
Return value of self.BBServer.registerEventHandler differs between jethro and master. To be able to build jethro toaster should be able to communicate with jethro bitbake server i.e. it must work with both old and new registerEventHandler call. (Bitbake rev: f356c154016c428a3b53af61a075de6f14d9d1d9) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
0b0d754950
commit
61b6b98f40
|
@ -24,7 +24,7 @@ server and queue them for the UI to process. This process must be used to avoid
|
|||
client/server deadlocks.
|
||||
"""
|
||||
|
||||
import socket, threading, pickle
|
||||
import socket, threading, pickle, collections
|
||||
from SimpleXMLRPCServer import SimpleXMLRPCServer, SimpleXMLRPCRequestHandler
|
||||
|
||||
class BBUIEventQueue:
|
||||
|
@ -51,7 +51,13 @@ class BBUIEventQueue:
|
|||
# giving up
|
||||
|
||||
for count_tries in range(5):
|
||||
self.EventHandle, error = self.BBServer.registerEventHandler(self.host, self.port)
|
||||
ret = self.BBServer.registerEventHandler(self.host, self.port)
|
||||
|
||||
if isinstance(ret, collections.Iterable):
|
||||
self.EventHandle, error = ret
|
||||
else:
|
||||
self.EventHandle = ret
|
||||
error = ""
|
||||
|
||||
if self.EventHandle != None:
|
||||
break
|
||||
|
|
Loading…
Reference in New Issue