aboutsummaryrefslogtreecommitdiffstats
path: root/lib/bb/server
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2015-12-31 18:42:14 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-01-05 17:59:13 +0000
commit07de1ca7d57dcd0cc37406feae2949da12a3fa7a (patch)
treefd677ec788a313506dcb534e18d353f65777b7b5 /lib/bb/server
parent9ec6379b27d210214d0b3f2e55962f721b7f5f51 (diff)
downloadbitbake-contrib-07de1ca7d57dcd0cc37406feae2949da12a3fa7a.tar.gz
uievent: add error to registerEventHandler return
Current code throws Exception("Could not register UI event handler") if event handler can't be registered. The real reason of this is that cooker is in busy state. Error message lacks information about this. Added error message to the return value of registerEventHandler. Included returned error message into the log message and exception text. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/server')
-rw-r--r--lib/bb/server/xmlrpc.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/bb/server/xmlrpc.py b/lib/bb/server/xmlrpc.py
index b7647c198..17eb28b7d 100644
--- a/lib/bb/server/xmlrpc.py
+++ b/lib/bb/server/xmlrpc.py
@@ -97,10 +97,10 @@ class BitBakeServerCommands():
# we don't allow connections if the cooker is running
if (self.cooker.state in [bb.cooker.state.parsing, bb.cooker.state.running]):
- return None
+ return None, "Cooker is busy: %s" % bb.cooker.state.get_name(self.cooker.state)
self.event_handle = bb.event.register_UIHhandler(s, True)
- return self.event_handle
+ return self.event_handle, 'OK'
def unregisterEventHandler(self, handlerNum):
"""