use dict syntax for app instances to allow API usage with plain dicts

Since metadata files are now YAML, programs should be able to just read in
the .yml files, then use them with fdroidserver methods without having to
know about the App class.  The App class just provides syntactic sugar by
allowing dict keys to be accessed as attributes.
This commit is contained in:
Hans-Christoph Steiner 2020-11-13 11:19:24 +01:00
parent e93acf7964
commit 0b879f18e5
2 changed files with 9 additions and 9 deletions

View file

@ -358,7 +358,7 @@ def make_v0(apps, apks, repodir, repodict, requestsdict, fdroid_signing_key_fing
for appid, appdict in apps.items():
app = metadata.App(appdict)
if app.Disabled is not None:
if app.get('Disabled') is not None:
continue
# Get a list of the apks for this app...