chiark / gitweb /
warn and ignore graphics files that have no matching app metadata
authorHans-Christoph Steiner <hans@eds.org>
Thu, 8 Dec 2016 18:28:31 +0000 (19:28 +0100)
committerHans-Christoph Steiner <hans@eds.org>
Fri, 17 Mar 2017 12:55:40 +0000 (13:55 +0100)
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

index 610324bcea3825394db90526b5f8936324266930..47cdd915914d63fcf7aa66656a9e9d03d9481602 100644 (file)
@@ -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']: