make mesh_interfaces optional

This commit is contained in:
Nils Schneider 2015-03-21 15:17:50 +01:00
parent 3ddecd26bf
commit 9195ea9650

View file

@ -87,7 +87,12 @@ def import_mesh_ifs_vis_data(nodes, vis_data):
for v in mesh_nodes: for v in mesh_nodes:
node = v[0] node = v[0]
mesh_ifs = set(node['nodeinfo']['network']['mesh_interfaces'])
try:
mesh_ifs = set(node['nodeinfo']['network']['mesh_interfaces'])
except KeyError:
mesh_ifs = set()
node['nodeinfo']['network']['mesh_interfaces'] = list(mesh_ifs | v[1]) node['nodeinfo']['network']['mesh_interfaces'] = list(mesh_ifs | v[1])
def import_vis_clientcount(nodes, vis_data): def import_vis_clientcount(nodes, vis_data):