From: Peter Amstutz Date: Thu, 12 May 2022 21:20:55 +0000 (-0400) Subject: 19109: Avoid recursion fail mode X-Git-Tag: 2.5.0~178^2 X-Git-Url: https://git.arvados.org/arvados.git/commitdiff_plain/1a6cf8e65c86a0002f0cf0c3a2d4092b67f9b57b 19109: Avoid recursion fail mode Arvados-DCO-1.1-Signed-off-by: Peter Amstutz --- diff --git a/sdk/cwl/arvados_cwl/runner.py b/sdk/cwl/arvados_cwl/runner.py index 995b23c080..c8668afcac 100644 --- a/sdk/cwl/arvados_cwl/runner.py +++ b/sdk/cwl/arvados_cwl/runner.py @@ -166,10 +166,13 @@ def set_secondary(fsaccess, builder, inputschema, secondaryspec, primary, discov set_secondary(fsaccess, builder, {"type": inputschema["items"]}, secondaryspec, p, discovered) elif (inputschema["type"] == "File" and - secondaryspec and isinstance(primary, Mapping) and - primary.get("class") == "File" and - "secondaryFiles" not in primary): + primary.get("class") == "File"): + + if "secondaryFiles" in primary or not secondaryspec: + # Nothing to do. + return + # # Found a file, check for secondaryFiles #