[oe-commits] [bitbake] 05/45: uievent: improve BBUIEventQueue code

git at git.openembedded.org git at git.openembedded.org
Wed Apr 6 22:11:23 UTC 2016


rpurdie pushed a commit to branch master
in repository bitbake.

commit f356c154016c428a3b53af61a075de6f14d9d1d9
Author: Ed Bartosh <ed.bartosh at linux.intel.com>
AuthorDate: Wed Apr 6 17:46:15 2016 +0100

    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 at linux.intel.com>
    Signed-off-by: Michael Wood <michael.g.wood at intel.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 lib/bb/ui/uievent.py | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/lib/bb/ui/uievent.py b/lib/bb/ui/uievent.py
index 6b479bf..df093c5 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

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list