Merge branch '10081-cwl-run-same-job' into 9988-cwl-arv-hints
[arvados.git] / sdk / cwl / arvados_cwl / arvworkflow.py
index 6087648a45e42e516d85eb00776d560a2c2a49ee..ab8ad035fd6c8d13d14b3d226135993e6c0792ce 100644 (file)
@@ -6,7 +6,7 @@ import logging
 from cwltool.pack import pack
 from cwltool.load_tool import fetch_document
 from cwltool.process import shortname
-from cwltool.workflow import Workflow
+from cwltool.workflow import Workflow, WorkflowException
 from cwltool.pathmapper import adjustFileObjs, adjustDirObjs
 
 import ruamel.yaml as yaml
@@ -83,8 +83,10 @@ class ArvadosWorkflow(Workflow):
             def keepmount(obj):
                 if obj["location"].startswith("keep:"):
                     obj["location"] = "/keep/" + obj["location"][5:]
+                elif obj["location"].startswith("_:"):
+                    pass
                 else:
-                    raise Exception("Uh oh %s" % obj["location"])
+                    raise WorkflowException("Location is not a keep reference or a literal: '%s'" % obj["location"])
                 if "listing" in obj:
                     del obj["listing"]
             adjustFileObjs(joborder_keepmount, keepmount)