From: Hans-Christoph Steiner Date: Mon, 17 Jul 2017 10:11:33 +0000 (+0200) Subject: verify: if downloading from /repo/ fails, try /archive/ X-Git-Tag: 0.8~9^2~6 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=7613c18dd80969cec9db0e209611c9ebc3176fed;p=fdroidserver.git verify: if downloading from /repo/ fails, try /archive/ The Builds entries in metadata/ files do not easily say whether a given APK is in the repo/ or the archive/. So it should also try to download the official APK from the archive/ when verifying. --- diff --git a/fdroidserver/verify.py b/fdroidserver/verify.py index 966c3874..85d1d2b2 100644 --- a/fdroidserver/verify.py +++ b/fdroidserver/verify.py @@ -80,7 +80,10 @@ def main(): try: net.download_file(url, dldir=tmp_dir) except requests.exceptions.HTTPError as e: - raise FDroidException('Downloading %s failed. %s', (url, e)) + try: + net.download_file(url.replace('/repo', '/archive/'), dldir=tmp_dir) + except requests.exceptions.HTTPError as e: + raise FDroidException('Downloading %s failed. %s', (url, e)) compare_result = common.verify_apks( remoteapk,