diff options
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/bb/server/xmlrpc.py | 4 | ||||
-rw-r--r-- | bitbake/lib/bb/ui/uievent.py | 8 |
2 files changed, 7 insertions, 5 deletions
diff --git a/bitbake/lib/bb/server/xmlrpc.py b/bitbake/lib/bb/server/xmlrpc.py index b7647c198f..17eb28b7d4 100644 --- a/bitbake/lib/bb/server/xmlrpc.py +++ b/bitbake/lib/bb/server/xmlrpc.py | |||
@@ -97,10 +97,10 @@ class BitBakeServerCommands(): | |||
97 | 97 | ||
98 | # we don't allow connections if the cooker is running | 98 | # we don't allow connections if the cooker is running |
99 | if (self.cooker.state in [bb.cooker.state.parsing, bb.cooker.state.running]): | 99 | if (self.cooker.state in [bb.cooker.state.parsing, bb.cooker.state.running]): |
100 | return None | 100 | return None, "Cooker is busy: %s" % bb.cooker.state.get_name(self.cooker.state) |
101 | 101 | ||
102 | self.event_handle = bb.event.register_UIHhandler(s, True) | 102 | self.event_handle = bb.event.register_UIHhandler(s, True) |
103 | return self.event_handle | 103 | return self.event_handle, 'OK' |
104 | 104 | ||
105 | def unregisterEventHandler(self, handlerNum): | 105 | def unregisterEventHandler(self, handlerNum): |
106 | """ | 106 | """ |
diff --git a/bitbake/lib/bb/ui/uievent.py b/bitbake/lib/bb/ui/uievent.py index 7fc50c759a..80686a65be 100644 --- a/bitbake/lib/bb/ui/uievent.py +++ b/bitbake/lib/bb/ui/uievent.py | |||
@@ -52,19 +52,21 @@ class BBUIEventQueue: | |||
52 | # giving up | 52 | # giving up |
53 | 53 | ||
54 | while self.EventHandler == None and count_tries < 5: | 54 | while self.EventHandler == None and count_tries < 5: |
55 | self.EventHandle = self.BBServer.registerEventHandler(self.host, self.port) | 55 | self.EventHandle, error = self.BBServer.registerEventHandler(self.host, self.port) |
56 | 56 | ||
57 | if (self.EventHandle != None): | 57 | if (self.EventHandle != None): |
58 | break | 58 | break |
59 | 59 | ||
60 | bb.warn("Could not register UI event handler %s:%d, retry" % (self.host, self.port)) | 60 | errmsg = "Could not register UI event handler. Error: %s, " \ |
61 | "host %s, port %d" % (error, self.host, self.port) | ||
62 | bb.warn("%s, retry" % errmsg) | ||
61 | count_tries += 1 | 63 | count_tries += 1 |
62 | import time | 64 | import time |
63 | time.sleep(1) | 65 | time.sleep(1) |
64 | 66 | ||
65 | 67 | ||
66 | if self.EventHandle == None: | 68 | if self.EventHandle == None: |
67 | raise Exception("Could not register UI event handler") | 69 | raise Exception(errmsg) |
68 | 70 | ||
69 | self.server = server | 71 | self.server = server |
70 | 72 | ||