summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2013-10-04 14:15:36 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-10-04 15:34:13 +0100
commit26913202f83fbbecdce95da59515af102bcde4a7 (patch)
tree2a8d6695507023f10c038d3d24ca460dcc290b33
parent719808f95adc7820fcc09743c592513414d03ce1 (diff)
downloadbitbake-26913202f83fbbecdce95da59515af102bcde4a7.tar.gz
xmlrpc: Show a better error message for connection failures
Showing a traceback when unable to connect to a bitbake server is rather ugly. This change allows us to show a sensible error message. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--lib/bb/server/xmlrpc.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/bb/server/xmlrpc.py b/lib/bb/server/xmlrpc.py
index 389327a60..82c0e8d8a 100644
--- a/lib/bb/server/xmlrpc.py
+++ b/lib/bb/server/xmlrpc.py
@@ -354,9 +354,12 @@ class BitBakeXMLRPCClient(BitBakeBaseServer):
s.close()
except:
return None
- self.serverImpl = XMLRPCProxyServer(host, port)
- self.connection = BitBakeXMLRPCServerConnection(self.serverImpl, (ip, 0), self.observer_only, featureset)
- return self.connection.connect()
+ try:
+ self.serverImpl = XMLRPCProxyServer(host, port)
+ self.connection = BitBakeXMLRPCServerConnection(self.serverImpl, (ip, 0), self.observer_only, featureset)
+ return self.connection.connect()
+ except Exception as e:
+ bb.fatal("Could not connect to server at %s:%s (%s)" % (host, port, str(e)))
def endSession(self):
self.connection.removeClient()