X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/df591042778408d03d410d5c22a669d85652d1ea..524c20020594ba67a2a822eccb632f8a5f5dc3ce:/sdk/cwl/arvados_cwl/fsaccess.py diff --git a/sdk/cwl/arvados_cwl/fsaccess.py b/sdk/cwl/arvados_cwl/fsaccess.py index 0b577b06a2..15689a9010 100644 --- a/sdk/cwl/arvados_cwl/fsaccess.py +++ b/sdk/cwl/arvados_cwl/fsaccess.py @@ -22,6 +22,8 @@ import arvados.collection import arvados.arvfile import arvados.errors +from googleapiclient.errors import HttpError + from schema_salad.ref_resolver import DefaultFetcher logger = logging.getLogger('arvados.cwl-runner') @@ -122,7 +124,13 @@ class CollectionFsAccess(cwltool.stdfsaccess.StdFsAccess): return super(CollectionFsAccess, self).open(self._abs(fn), mode) def exists(self, fn): - collection, rest = self.get_collection(fn) + try: + collection, rest = self.get_collection(fn) + except HttpError as err: + if err.resp.status == 404: + return False + else: + raise if collection is not None: if rest: return collection.exists(rest)