mirror of
https://github.com/cwinfo/yggdrasil-map
synced 2024-11-22 08:10:27 +00:00
Don't crash if connecting fails
This commit is contained in:
parent
e5e937b688
commit
bb79df7985
@ -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))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user