From 02c59a327bd84927f0337f752aeb147e50ef4bbc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Mart=C3=AD?= Date: Mon, 7 Dec 2015 12:33:24 +0100 Subject: [PATCH] stats: fix a few dict accesses left over --- fdroidserver/stats.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fdroidserver/stats.py b/fdroidserver/stats.py index ac989614..f80505c3 100644 --- a/fdroidserver/stats.py +++ b/fdroidserver/stats.py @@ -68,8 +68,8 @@ def main(): sys.exit(1) # Get all metadata-defined apps... - allmetaapps = [a for a in metadata.read_metadata().itervalues()] - metaapps = [a for a in allmetaapps if not a['Disabled']] + allmetaapps = [app for app in metadata.read_metadata().itervalues()] + metaapps = [app for app in allmetaapps if not app.Disabled] statsdir = 'stats' logsdir = os.path.join(statsdir, 'logs') @@ -271,7 +271,7 @@ def main(): # Write list of disabled apps... logging.info("Processing disabled apps...") - disabled = [a['id'] for a in allmetaapps if a['Disabled']] + disabled = [app.id for app in allmetaapps if app.Disabled] with open(os.path.join(statsdir, 'disabled_apps.txt'), 'w') as f: for appid in sorted(disabled): f.write(appid + '\n')