1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-10-03 17:50:11 +02:00

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.
This commit is contained in:
Hans-Christoph Steiner 2016-12-08 19:28:31 +01:00
parent 21ba89a581
commit 696bae4d6d

View File

@ -603,7 +603,9 @@ def insert_graphics(repodir, apps):
base, extension = common.get_extension(filename) base, extension = common.get_extension(filename)
if packageName not in apps: 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]: if 'localized' not in apps[packageName]:
apps[packageName]['localized'] = collections.OrderedDict() apps[packageName]['localized'] = collections.OrderedDict()
if locale not in apps[packageName]['localized']: if locale not in apps[packageName]['localized']: