diff options
author | Ed Bartosh <ed.bartosh@linux.intel.com> | 2015-12-31 18:42:14 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-01-05 17:59:13 +0000 |
commit | 07de1ca7d57dcd0cc37406feae2949da12a3fa7a (patch) | |
tree | fd677ec788a313506dcb534e18d353f65777b7b5 /lib/bb/ui | |
parent | 9ec6379b27d210214d0b3f2e55962f721b7f5f51 (diff) | |
download | bitbake-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/ui')
-rw-r--r-- | lib/bb/ui/uievent.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/bb/ui/uievent.py b/lib/bb/ui/uievent.py index 7fc50c759..80686a65b 100644 --- a/lib/bb/ui/uievent.py +++ b/lib/bb/ui/uievent.py @@ -52,19 +52,21 @@ class BBUIEventQueue: # giving up while self.EventHandler == None and count_tries < 5: - self.EventHandle = self.BBServer.registerEventHandler(self.host, self.port) + self.EventHandle, error = self.BBServer.registerEventHandler(self.host, self.port) if (self.EventHandle != None): break - bb.warn("Could not register UI event handler %s:%d, retry" % (self.host, self.port)) + errmsg = "Could not register UI event handler. Error: %s, " \ + "host %s, port %d" % (error, self.host, self.port) + bb.warn("%s, retry" % errmsg) count_tries += 1 import time time.sleep(1) if self.EventHandle == None: - raise Exception("Could not register UI event handler") + raise Exception(errmsg) self.server = server |