Skip to content

Commit 3af8ca3

Browse files
author
Peter Amstutz
committed
Fix hint validation.
1 parent a4e49a5 commit 3af8ca3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

cwltool/process.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ def __init__(self, toolpath_object, **kwargs):
244244
self.formatgraph = kwargs["loader"].graph
245245

246246
checkRequirements(self.tool, supportedProcessRequirements)
247-
self.validate_hints(self.tool.get("hints", []), strict=kwargs.get("strict"))
247+
self.validate_hints(kwargs["avsc_names"], self.tool.get("hints", []), strict=kwargs.get("strict"))
248248

249249
self.schemaDefs = {} # type: Dict[str,Dict[unicode, Any]]
250250

@@ -407,12 +407,12 @@ def evalResources(self, builder, kwargs):
407407
"outdirSize": request["outdirMin"],
408408
}
409409

410-
def validate_hints(self, hints, strict):
410+
def validate_hints(self, avsc_names, hints, strict):
411411
# type: (List[Dict[str, Any]], bool) -> None
412412
for r in hints:
413413
try:
414-
if self.names.get_name(r["class"], "") is not None:
415-
validate.validate_ex(self.names.get_name(r["class"], ""), r, strict=strict)
414+
if avsc_names.get_name(r["class"], "") is not None:
415+
validate.validate_ex(avsc_names.get_name(r["class"], ""), r, strict=strict)
416416
else:
417417
_logger.info(str(validate.ValidationException(
418418
u"Unknown hint %s" % (r["class"]))))

0 commit comments

Comments
 (0)