Fixing G.nodes() iteration that needs us to force Python to create a copy for iterati...
authorrtrimana <rtrimana@uci.edu>
Wed, 21 Feb 2018 19:40:23 +0000 (11:40 -0800)
committerrtrimana <rtrimana@uci.edu>
Wed, 21 Feb 2018 19:40:23 +0000 (11:40 -0800)
base_gexf_generator.py

index 5874b21..34c0631 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