Ejemplo n.º 1
0
 def test(self):
     """
     Checks whether all required attributes are set. Throws an exception
     if an error was detected.
     """
     TaskSpec.test(self)
     if len(self.outputs) > 0:
         raise WorkflowException(self, 'CancelJob with an output.')
Ejemplo n.º 2
0
 def test(self):
     """
     Checks whether all required attributes are set. Throws an exception
     if an error was detected.
     """
     TaskSpec.test(self)
     if len(self.cond_task_specs) < 1:
         raise WorkflowException(self, 'At least one output required.')
     for condition, task in self.cond_task_specs:
         if task is None:
             raise WorkflowException(self, 'Condition with no task.')
         if condition is None:
             continue
         if condition is None:
             raise WorkflowException(self, 'Condition is None.')
Ejemplo n.º 3
0
 def test(self):
     """
     Checks whether all required attributes are set. Throws an exception
     if an error was detected.
     """
     TaskSpec.test(self)
     if len(self.cond_taskspecs) < 1:
         raise WorkflowException(self, 'At least one output required.')
     for condition, task in self.cond_taskspecs:
         if task is None:
             raise WorkflowException(self, 'Condition with no task.')
         if condition is None:
             continue
         if condition is None:
             raise WorkflowException(self, 'Condition is None.')
Ejemplo n.º 4
0
 def test(self):
     """
     Checks whether all required attributes are set. Throws an exception
     if an error was detected.
     """
     TaskSpec.test(self)
     if len(self.cond_task_specs) < 1:
         raise WorkflowException(self, 'At least one output required.')
     for condition, name in self.cond_task_specs:
         if name is None:
             raise WorkflowException(self, 'Condition with no task spec.')
         task_spec = self._parent.get_task_spec_from_name(name)
         if task_spec is None:
             msg = 'Condition leads to non-existent task ' + repr(name)
             raise WorkflowException(self, msg)
         if condition is None:
             continue
Ejemplo n.º 5
0
 def test(self):
     TaskSpec.test(self)
     if self.file is not None and not os.path.exists(self.file):
         raise WorkflowException(self, 'File does not exist: %s' % self.file)
Ejemplo n.º 6
0
 def test(self):
     TaskSpec.test(self)
     if self.file is not None and not os.path.exists(self.file):
         raise WorkflowException(self,
                                 'File does not exist: %s' % self.file)