From dcf2919c480a13f2214725453f3ec3c41fedf26c Mon Sep 17 00:00:00 2001 From: rtrimana Date: Wed, 21 Feb 2018 11:40:23 -0800 Subject: [PATCH] Fixing G.nodes() iteration that needs us to force Python to create a copy for iteration condition by adding list() --- base_gexf_generator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base_gexf_generator.py b/base_gexf_generator.py index 5874b21..34c0631 100644 --- a/base_gexf_generator.py +++ b/base_gexf_generator.py @@ -106,7 +106,7 @@ def traverse_and_merge_nodes(G, dev_list_file): dev_list = create_device_list(DEVICE_MAC_LIST) # Traverse every node # Check that the node is not a smarthome device - for node in nodes: + for node in list(nodes): neighbors = G[node] #G.neighbors(node) #print "Neighbors: ", neighbors, "\n" # Skip if the node is a smarthome device -- 2.34.1