summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/server/xmlrpc.py
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-06 15:27:34 +0000
commit4e0de6eca23488dc6f334ef28453b46c046888af (patch)
treeef36ab255d51578e616c6e8178ae1422bee89020 /bitbake/lib/bb/server/xmlrpc.py
parent01419d5565a5e3762ec4a2a382f2099683615e52 (diff)
downloadpoky-4e0de6eca23488dc6f334ef28453b46c046888af.tar.gz
bitbake: 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. (Bitbake rev: 07de1ca7d57dcd0cc37406feae2949da12a3fa7a) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/server/xmlrpc.py')
-rw-r--r--bitbake/lib/bb/server/xmlrpc.py4
1 files changed, 2 insertions, 2 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 """