示例#1
0
文件: workers.py 项目: floli/flof
 def run(self):
     # Since the workers are modifying the configuration tree when doing the string interpolation
     # we save it as a string and replay it each iteration.
     original_node = ET.tostring(self.config)
     var_name = self.config.attrib["variable"]
     var_range = eval(self.config.attrib["range"])
     self.logger.info("Starting variation loop, variable: %s, range: %s", var_name, var_range)
     wd = os.getcwd()
     for var in var_range:
         ctx = self.context
         ctx.update( {var_name : var} )
         self.logger.info("Doing variation, variable: %s, value: %s", var_name, var)
         os.chdir(wd)
         wf = WorkerFactory(ET.ElementTree(self.config), self.context)
         wf.execute()
         self.config = ET.fromstring(original_node)
示例#2
0
文件: workers.py 项目: floli/flof
 def run(self):
     # Since the workers are modifying the configuration tree when doing the string interpolation
     # we save it as a string and replay it each iteration.
     original_node = ET.tostring(self.config)
     var_name = self.config.attrib["variable"]
     var_range = eval(self.config.attrib["range"])
     self.logger.info("Starting variation loop, variable: %s, range: %s",
                      var_name, var_range)
     wd = os.getcwd()
     for var in var_range:
         ctx = self.context
         ctx.update({var_name: var})
         self.logger.info("Doing variation, variable: %s, value: %s",
                          var_name, var)
         os.chdir(wd)
         wf = WorkerFactory(ET.ElementTree(self.config), self.context)
         wf.execute()
         self.config = ET.fromstring(original_node)
示例#3
0
文件: workers.py 项目: floli/flof
 def run(self):
     """ Runs its subworkers. """
     wf = WorkerFactory(ET.ElementTree(self.config), self.context)
     wf.execute()
示例#4
0
文件: workers.py 项目: floli/flof
 def run(self):
     """ Runs its subworkers. """
     wf = WorkerFactory(ET.ElementTree(self.config), self.context)
     wf.execute()