Support more url schemes for getting standalone manifest

urllib.requests.urlopen also supports file, so call it unless the
scheme is 'gs'.  This adds http, https, and ftp support.

Change-Id: I3f215c3ebd8e6dee29ba14c7e79ed99d37287109
Reviewed-by: Michael Kelly <>
Reviewed-by: Mike Frysinger <>
Tested-by: Matt Story <>
diff --git a/ b/
index d79f947..c954a9c 100644
--- a/
+++ b/
@@ -17,6 +17,8 @@
 import subprocess
 import sys
 from urllib.parse import urlparse
+from urllib.request import urlopen
 def fetch_file(url, verbose=False):
   """Fetch a file from the specified source using the appropriate protocol.
@@ -39,7 +41,5 @@
       print('fatal: error running "gsutil": %s' % e.stderr,
-  if scheme == 'file':
-    with open(url[len('file://'):], 'rb') as f:
-      return
-  raise ValueError('unsupported url %s' % url)
+  with urlopen(url) as f:
+    return