5
0
mirror of https://github.com/cwinfo/yggdrasil-map synced 2024-09-19 14:59:35 +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, print port,
these_nodes = dict() these_nodes = dict()
these_edges = [] these_edges = []
cjdns = admin.connect(rpc_connect, port, rpc_pw)
root = admin.whoami(cjdns) try:
rootIP = root['IP'] cjdns = admin.connect(rpc_connect, port, rpc_pw)
print rootIP root = admin.whoami(cjdns)
rootIP = root['IP']
print rootIP
except:
print 'Connecting failed.'
continue
add_node(Node(rootIP)) add_node(Node(rootIP))