Try to download files on Google Storage with curl.
@@ -135,7 +135,9 @@ class ScriptRetriever(object):
match = gs_regex.match(url)
if match:
gs_url = r'gs://%s/%s' % (match.group('bucket'), match.group('obj'))
- return self._DownloadGsUrl(gs_url, dest_dir)
+ # In case gsutil is not installed, continue as a normal URL.
+ return (self._DownloadGsUrl(gs_url, dest_dir) or
+ self._DownloadUrl(url, dest_dir))
# Check for the other possible Google Storage URLs:
# http://storage.googleapis.com/<bucket>/<object>
@@ -149,7 +151,9 @@ class ScriptRetriever(object):
match = gs_regex.match(url)
if match:
gs_url = r'gs://%s/%s' % (match.group('bucket'), match.group('obj'))
- return self._DownloadGsUrl(gs_url, dest_dir)
+ # In case gsutil is not installed, continue as a normal URL.
+ return (self._DownloadGsUrl(gs_url, dest_dir) or
+ self._DownloadUrl(url, dest_dir))
# Unauthenticated download of the object.
return self._DownloadUrl(url, dest_dir)
