summaryrefslogtreecommitdiffstats
path: root/bitbake/lib
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-07 09:37:34 +0100
commit22d5782ef56025061fa757538c6bb5a7940946f1 (patch)
treead9435c4359d1aacce66a134713a96d5339ab639 /bitbake/lib
parenta333693c7f5403ca1f669b4bf553e608eb357d9b (diff)
downloadpoky-22d5782ef56025061fa757538c6bb5a7940946f1.tar.gz
bitbake: 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. (Bitbake rev: 26913202f83fbbecdce95da59515af102bcde4a7) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib')
-rw-r--r--bitbake/lib/bb/server/xmlrpc.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/bitbake/lib/bb/server/xmlrpc.py b/bitbake/lib/bb/server/xmlrpc.py
index 389327a60f..82c0e8d8a6 100644
--- a/bitbake/lib/bb/server/xmlrpc.py
+++ b/bitbake/lib/bb/server/xmlrpc.py
@@ -354,9 +354,12 @@ class BitBakeXMLRPCClient(BitBakeBaseServer):
354 s.close() 354 s.close()
355 except: 355 except:
356 return None 356 return None
357 self.serverImpl = XMLRPCProxyServer(host, port) 357 try:
358 self.connection = BitBakeXMLRPCServerConnection(self.serverImpl, (ip, 0), self.observer_only, featureset) 358 self.serverImpl = XMLRPCProxyServer(host, port)
359 return self.connection.connect() 359 self.connection = BitBakeXMLRPCServerConnection(self.serverImpl, (ip, 0), self.observer_only, featureset)
360 return self.connection.connect()
361 except Exception as e:
362 bb.fatal("Could not connect to server at %s:%s (%s)" % (host, port, str(e)))
360 363
361 def endSession(self): 364 def endSession(self):
362 self.connection.removeClient() 365 self.connection.removeClient()