File tree Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -281,15 +281,21 @@ def make_tool(document_loader, # type: Loader
281
281
"""Make a Python CWL object."""
282
282
resolveduri = document_loader .resolve_ref (uri )[0 ]
283
283
284
+ processobj = None
284
285
if isinstance (resolveduri , list ):
285
286
if len (resolveduri ) == 1 :
286
287
processobj = resolveduri [0 ]
287
288
else :
288
- raise WorkflowException (
289
- u"Tool file contains graph of multiple objects, must specify "
290
- "one of #%s" % ", #" .join (
291
- urllib .parse .urldefrag (i ["id" ])[1 ] for i in resolveduri
292
- if "id" in i ))
289
+ for obj in resolveduri :
290
+ if obj ['id' ].endswith ('#main' ):
291
+ processobj = obj
292
+ break
293
+ if not processobj :
294
+ raise WorkflowException (
295
+ u"Tool file contains graph of multiple objects, must specify "
296
+ "one of #%s" % ", #" .join (
297
+ urllib .parse .urldefrag (i ["id" ])[1 ] for i in resolveduri
298
+ if "id" in i ))
293
299
elif isinstance (resolveduri , dict ):
294
300
processobj = resolveduri
295
301
else :
You can’t perform that action at this time.
0 commit comments