Fixing G.nodes() iteration that needs us to force Python to create a copy for iterati...
[pingpong.git] / base_gexf_generator.py
index 5874b21fb25a79b12079802fc46aff0949611d9c..34c063136736d70bc2ab09698e18af877e935ad2 100644 (file)
@@ -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