If a file does not exist on x20, do not try to download it.
Instead, provide a helpful error message at how to process.
This is particularly helpful when building while x20 is not
available.
Bug:
Change-Id: Ibb79cd47edb6508110bea6a23024b1669a1eb591
diff --git a/tools/download_from_x20.py b/tools/download_from_x20.py
index 401fa53..60a10f6 100755
--- a/tools/download_from_x20.py
+++ b/tools/download_from_x20.py
@@ -50,6 +50,8 @@
src = os.path.join(GMSCORE_DEPS, sha1)
if not os.path.exists(src):
print 'File (%s) does not exist on x20' % src
+ print 'Maybe pass -Pno_internal to your gradle invocation'
+ return 42
print 'Downloading %s to %s' % (src, dest)
shutil.copyfile(src, dest)
unpack_archive(dest)