From 9195ea96501dc3f33ced25d39b1746cbdbb37c87 Mon Sep 17 00:00:00 2001 From: Nils Schneider Date: Sat, 21 Mar 2015 15:17:50 +0100 Subject: [PATCH] make mesh_interfaces optional --- nodes.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/nodes.py b/nodes.py index 3a52753..61949e1 100644 --- a/nodes.py +++ b/nodes.py @@ -87,7 +87,12 @@ def import_mesh_ifs_vis_data(nodes, vis_data): for v in mesh_nodes: 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]) def import_vis_clientcount(nodes, vis_data):