From 7a1e7e772f3bbc67660e824c98f527b5f608ac24 Mon Sep 17 00:00:00 2001 From: Jack Neus Date: Thu, 23 Sep 2021 13:59:58 +0000 Subject: [PATCH] repo: add support for reading standalone manifests from disk BUG=b:192664812 TEST=existing tests (no coverage), manual runs Change-Id: Ic032417ecfca77d5e0de1b1ff62b30ce8205bfc5 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/318715 Tested-by: Jack Neus Reviewed-by: Mike Frysinger --- fetch.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fetch.py b/fetch.py index 5b9997a8..91d40cda 100644 --- a/fetch.py +++ b/fetch.py @@ -35,4 +35,7 @@ def fetch_file(url): print('fatal: error running "gsutil": %s' % e.output, file=sys.stderr) sys.exit(1) + if scheme == 'file': + with open(url[len('file://'):], 'rb') as f: + return f.read() raise ValueError('unsupported url %s' % url)