X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/4dac499d30988fd8289a40ad4128d6d471037180..6f6ce90eb894bde190fd7522cbec037fe61fc25c:/sdk/cwl/arvados_cwl/fsaccess.py?ds=sidebyside diff --git a/sdk/cwl/arvados_cwl/fsaccess.py b/sdk/cwl/arvados_cwl/fsaccess.py index 7736cab4d8..08e203b879 100644 --- a/sdk/cwl/arvados_cwl/fsaccess.py +++ b/sdk/cwl/arvados_cwl/fsaccess.py @@ -1,3 +1,7 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: Apache-2.0 + import fnmatch import os import errno @@ -91,7 +95,7 @@ class CollectionFsAccess(cwltool.stdfsaccess.StdFsAccess): def exists(self, fn): collection, rest = self.get_collection(fn) - if collection: + if collection is not None: if rest: return collection.exists(rest) else: @@ -223,6 +227,9 @@ workflow_uuid_pattern = re.compile(r'[a-z0-9]{5}-7fd4e-[a-z0-9]{15}') pipeline_template_uuid_pattern = re.compile(r'[a-z0-9]{5}-p5p6p-[a-z0-9]{15}') def collectionResolver(api_client, document_loader, uri, num_retries=4): + if uri.startswith("keep:") or uri.startswith("arvwf:"): + return uri + if workflow_uuid_pattern.match(uri): return "arvwf:%s#main" % (uri)