import arvados.commands.run
import arvados.collection
+from schema_salad.sourceline import SourceLine
+
from cwltool.pathmapper import PathMapper, MapperEnt, abspath, adjustFileObjs, adjustDirObjs
from cwltool.workflow import WorkflowException
if "contents" in srcobj:
pass
else:
- raise WorkflowException("File literal '%s' is missing contents" % src)
+ raise SourceLine(srcobj, "location", WorkflowException).makeError("File literal '%s' is missing contents" % src)
elif src.startswith("arvwf:"):
self._pathmap[src] = MapperEnt(src, src, "File")
else:
- raise WorkflowException("Input file path '%s' is invalid" % st)
+ raise SourceLine(srcobj, "location", WorkflowException).makeError("Input file path '%s' is invalid" % st)
if "secondaryFiles" in srcobj:
for l in srcobj["secondaryFiles"]:
self.visit(l, uploadfiles)
with c.open(path + "/" + obj["basename"], "w") as f:
f.write(obj["contents"].encode("utf-8"))
else:
- raise WorkflowException("Don't know what to do with '%s'" % obj["location"])
+ raise SourceLine(obj, "location", WorkflowException).makeError("Don't know what to do with '%s'" % obj["location"])
def setup(self, referenced_files, basedir):
# type: (List[Any], unicode) -> None