this change was done in py2 and makes sense in py3 as well
authorThierry Parmentelat <thierry.parmentelat@inria.fr>
Wed, 14 Oct 2015 15:16:50 +0000 (17:16 +0200)
committerThierry Parmentelat <thierry.parmentelat@inria.fr>
Wed, 14 Oct 2015 15:16:50 +0000 (17:16 +0200)
examples/omf/testing/nepi_omf5_nitos_ccnring.py

index 680b2a7..d38ba6b 100644 (file)
@@ -255,17 +255,17 @@ if __name__ == '__main__':
 
 # Cleaning when the experiment stop
     ccndstops = []
-    for i in range(len(all_hosts)):
-        ccndstop = add_app(ec, nodes[all_hosts[i]], "#ccndstop", "ccndstop", env, xmpp_slice, xmpp_host)
+    for host all_hosts:
+        ccndstop = add_app(ec, nodes[host], "#ccndstop", "ccndstop", env, xmpp_slice, xmpp_host)
         ccndstops.append(ccndstop)
 
     killall = add_app(ec, nodes[host6], "#kill", "killall sh", "", xmpp_slice, xmpp_host)
 
 # Condition to stop and clean the experiment
     apps = []
-    for i in range(len(all_hosts)):
-        apps.append(ccnds[all_hosts[i]])
-        apps.append(ccnrs[all_hosts[i]])
+    for host in all_hosts:
+        apps.append(ccnds[host])
+        apps.append(ccnrs[host])
     apps += link
     apps.append(pub)
     apps.append(stream)