summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2016-04-06 17:46:15 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-04-06 23:00:10 +0100
commitf356c154016c428a3b53af61a075de6f14d9d1d9 (patch)
tree21e40b283bbea1013d38db96a804ce060c2bb882
parenta0c8e2b309055e5927a8ff729d292ccaa69d0575 (diff)
downloadopenembedded-core-contrib-f356c154016c428a3b53af61a075de6f14d9d1d9.tar.gz
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. 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>
-rw-r--r--lib/bb/ui/uievent.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/bb/ui/uievent.py b/lib/bb/ui/uievent.py
index 6b479bfa54..df093c53c0 100644
--- a/lib/bb/ui/uievent.py
+++ b/lib/bb/ui/uievent.py
@@ -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