From 87f7e67e55a5416811b09ff148b1227b30535424 Mon Sep 17 00:00:00 2001 From: Dan Billings Date: Wed, 17 Jan 2018 15:54:01 -0500 Subject: [PATCH] short circuit google storage schemas --- cwltool/schemas/v1.0/salad/schema_salad/ref_resolver.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cwltool/schemas/v1.0/salad/schema_salad/ref_resolver.py b/cwltool/schemas/v1.0/salad/schema_salad/ref_resolver.py index 3101e32f4..f38d2bf62 100644 --- a/cwltool/schemas/v1.0/salad/schema_salad/ref_resolver.py +++ b/cwltool/schemas/v1.0/salad/schema_salad/ref_resolver.py @@ -155,7 +155,7 @@ def fetch_text(self, url): else: raise RuntimeError('Error reading %s: %s' % (url, e)) else: - raise ValueError('Unsupported scheme in url: %s' % url) + raise ValueError('Unsupported scheme in url: %s for scheme %s' % (url, scheme)) def check_exists(self, url): # type: (Text) -> bool if url in self.cache: @@ -173,8 +173,11 @@ def check_exists(self, url): # type: (Text) -> bool return True elif scheme == 'file': return os.path.exists(urllib.request.url2pathname(str(path))) + # Google storage links are protected by user accounts and thus are not subject to external validation + elif scheme == 'gs': + return True else: - raise ValueError('Unsupported scheme in url: %s' % url) + raise ValueError('Error while checking link exists: Unsupported scheme %s in url: %s' % (scheme, url)) def urljoin(self, base_url, url): # type: (Text, Text) -> Text