10466: Report missing 'location' in File object as workflow error.
authorPeter Amstutz <peter.amstutz@curoverse.com>
Tue, 8 Nov 2016 18:42:16 +0000 (13:42 -0500)
committerPeter Amstutz <peter.amstutz@curoverse.com>
Tue, 8 Nov 2016 18:42:52 +0000 (13:42 -0500)
sdk/cwl/arvados_cwl/arvworkflow.py

index 8eb8fe6fee50e0722ee7066171ff7b7bbc4a10c5..ce633d43285a537268f3bc96dc446696d17d06a6 100644 (file)
@@ -87,6 +87,8 @@ class ArvadosWorkflow(Workflow):
                 joborder_keepmount = copy.deepcopy(joborder)
 
                 def keepmount(obj):
+                    if "location" not in obj:
+                        raise WorkflowException("%s object is missing required 'location' field: %s" % (obj["class"], obj))
                     if obj["location"].startswith("keep:"):
                         obj["location"] = "/keep/" + obj["location"][5:]
                         if "listing" in obj: