From 696bae4d6d93ae04d7f1c76853005b6495847258 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Thu, 8 Dec 2016 19:28:31 +0100 Subject: [PATCH] warn and ignore graphics files that have no matching app metadata If there are graphics files that are in repo/ but there is no metadata for the associated app, then do not include the graphics in the index. Issue a warning about this. --- fdroidserver/update.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fdroidserver/update.py b/fdroidserver/update.py index 610324bc..47cdd915 100644 --- a/fdroidserver/update.py +++ b/fdroidserver/update.py @@ -603,7 +603,9 @@ def insert_graphics(repodir, apps): base, extension = common.get_extension(filename) if packageName not in apps: - apps[packageName] = metadata.App() + logging.warning('Found "%s" graphic without metadata for app "%s"!' + % (filename, packageName)) + continue if 'localized' not in apps[packageName]: apps[packageName]['localized'] = collections.OrderedDict() if locale not in apps[packageName]['localized']: -- 2.30.2