5
0
mirror of https://github.com/cwinfo/yggdrasil-map synced 2024-12-30 19:55:39 +00:00

Don't crash if connecting fails

This commit is contained in:
Vanhala Antti 2014-03-30 21:03:24 +03:00
parent e5e937b688
commit bb79df7985

View File

@ -50,10 +50,15 @@ for port in range(rpc_firstport, rpc_firstport + num_of_nodes):
print port,
these_nodes = dict()
these_edges = []
cjdns = admin.connect(rpc_connect, port, rpc_pw)
root = admin.whoami(cjdns)
rootIP = root['IP']
print rootIP
try:
cjdns = admin.connect(rpc_connect, port, rpc_pw)
root = admin.whoami(cjdns)
rootIP = root['IP']
print rootIP
except:
print 'Connecting failed.'
continue
add_node(Node(rootIP))