Skip to content

Commit 54d7fb5

Browse files
author
Peter Amstutz
committed
Change Workflow.visit() to call WorkflowStep.visit().
1 parent 12903ef commit 54d7fb5

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

cwltool/process.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def get_schema(): # type: () -> Tuple[Loader,avro.schema.Names,List[Dict[str,An
8484

8585
return schema_salad.schema.load_schema("https://w3id.org/cwl/CommonWorkflowLanguage.yml", cache=cache)
8686

87-
def get_feature(self, feature): # type: (Any, Any) -> Tuple[Any, bool]
87+
def get_feature(self, feature): # type: (Any, Any) -> Tuple[Any, bool]
8888
for t in reversed(self.requirements):
8989
if t["class"] == feature:
9090
return (t, True)
@@ -354,7 +354,7 @@ def get_requirement(self, feature):
354354
return get_feature(self, feature)
355355

356356
def visit(self, op):
357-
self.tool = op(self.tool)
357+
op(self.tool)
358358

359359
@abc.abstractmethod
360360
def job(self, job_order, input_basedir, output_callbacks, **kwargs):

cwltool/workflow.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -398,8 +398,10 @@ def job(self, joborder, basedir, output_callback, **kwargs):
398398
yield w
399399

400400
def visit(self, op):
401-
self.tool = op(self.tool)
402-
self.steps = [op(s.tool) for s in self.steps]
401+
op(self.tool)
402+
for s in self.steps:
403+
s.visit(op)
404+
403405

404406
class WorkflowStep(Process):
405407

@@ -512,6 +514,9 @@ def job(self, joborder, basedir, output_callback, **kwargs):
512514
_logger.exception("Unexpected exception")
513515
raise WorkflowException(str(e))
514516

517+
def visit(self, op):
518+
self.embedded_tool.visit(op)
519+
515520

516521
class ReceiveScatterOutput(object):
517522

0 commit comments

Comments
 (0)