Skip to content

Commit 99fecda

Browse files
authored
Merge branch 'master' into py3_conformance
2 parents fa0144d + 845ce98 commit 99fecda

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

cwltool/load_tool.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,14 +162,15 @@ def validate_document(document_loader, # type: Loader
162162
if "cwlVersion" in workflowobj:
163163
if not isinstance(workflowobj["cwlVersion"], (str, Text)):
164164
raise Exception("'cwlVersion' must be a string, got %s" % type(workflowobj["cwlVersion"]))
165+
# strip out version
166+
workflowobj["cwlVersion"] = re.sub(
167+
r"^(?:cwl:|https://w3id.org/cwl/cwl#)", "",
168+
workflowobj["cwlVersion"])
165169
if workflowobj["cwlVersion"] not in list(ALLUPDATES):
166170
# print out all the Supported Versions of cwlVersion
167171
versions = list(ALLUPDATES) # ALLUPDATES is a dict
168172
versions.sort()
169173
raise ValidationException("'cwlVersion' not valid. Supported CWL versions are: \n{}".format("\n".join(versions)))
170-
workflowobj["cwlVersion"] = re.sub(
171-
r"^(?:cwl:|https://w3id.org/cwl/cwl#)", "",
172-
workflowobj["cwlVersion"])
173174
else:
174175
raise ValidationException("No cwlVersion found."
175176
"Use the following syntax in your CWL workflow to declare version: cwlVersion: <version>")

0 commit comments

Comments
 (0)