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>
This commit is contained in:
parent
a333693c7f
commit
22d5782ef5
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue