From 9d15d1117c80ee9313d0dc391488efb9bb060a4a Mon Sep 17 00:00:00 2001 From: Sander Vrijders Date: Mon, 13 Nov 2017 13:18:00 +0100 Subject: prototypes: ouroboros: Use zip function This uses the zip function to run through the different lists in bootstrap_prototype, since it is a more elegant solution. --- rumba/prototypes/ouroboros.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/rumba/prototypes/ouroboros.py b/rumba/prototypes/ouroboros.py index cb0bf08..716f1b8 100644 --- a/rumba/prototypes/ouroboros.py +++ b/rumba/prototypes/ouroboros.py @@ -148,11 +148,12 @@ class Experiment(mod.Experiment): logger.info("Creating IPCPs") self.create_ipcps() logger.info("Enrolling IPCPs...") - i = 0 - for element in self.enrollments: + + for element, mgmt, dt in zip(self.enrollments, + self.mgmt_flows, + self.dt_flows): self.enroll_dif(element) - self.setup_flows(self.mgmt_flows[i], comp="mgmt") - self.setup_flows(self.dt_flows[i], comp="dt") - i = i + 1 + self.setup_flows(mgmt, comp="mgmt") + self.setup_flows(dt, comp="dt") logger.info("All done, have fun!") -- cgit v1.2.3