From: Hans-Christoph Steiner Date: Mon, 30 Jun 2014 16:19:47 +0000 (-0400) Subject: check repo icons exist now before running through all of `fdroid update` X-Git-Tag: 0.2.1~73^2~4 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=3dbe503071ca34d514c40657ea2e2f678e61b232;p=fdroidserver.git check repo icons exist now before running through all of `fdroid update` Before, if repo_icon or archive_icon pointed to a non-existent file, then `fdroid update` would run through the whole process of building a repo, then fail at the very end because of the non-existent file. On the next run, `fdroid update` then starts from the beginning. This just checks for those files at the beginning, and exits with an error if they are not found. --- diff --git a/fdroidserver/update.py b/fdroidserver/update.py index 92ec3fab..952165b5 100644 --- a/fdroidserver/update.py +++ b/fdroidserver/update.py @@ -933,6 +933,13 @@ def main(): resize_all_icons(repodirs) sys.exit(0) + # check that icons exist now, rather than fail at the end of `fdroid update` + for k in ['repo_icon', 'archive_icon']: + if k in config: + if not os.path.exists(config[k]): + logging.error(k + ' "' + config[k] + '" does not exist! Correct it in config.py.') + sys.exit(1) + # Get all apps... apps = metadata.read_metadata()