mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-11-04 14:30:11 +01:00
stats: fix a few dict accesses left over
This commit is contained in:
parent
ae5b8ed496
commit
02c59a327b
@ -68,8 +68,8 @@ def main():
|
|||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
# Get all metadata-defined apps...
|
# Get all metadata-defined apps...
|
||||||
allmetaapps = [a for a in metadata.read_metadata().itervalues()]
|
allmetaapps = [app for app in metadata.read_metadata().itervalues()]
|
||||||
metaapps = [a for a in allmetaapps if not a['Disabled']]
|
metaapps = [app for app in allmetaapps if not app.Disabled]
|
||||||
|
|
||||||
statsdir = 'stats'
|
statsdir = 'stats'
|
||||||
logsdir = os.path.join(statsdir, 'logs')
|
logsdir = os.path.join(statsdir, 'logs')
|
||||||
@ -271,7 +271,7 @@ def main():
|
|||||||
|
|
||||||
# Write list of disabled apps...
|
# Write list of disabled apps...
|
||||||
logging.info("Processing 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:
|
with open(os.path.join(statsdir, 'disabled_apps.txt'), 'w') as f:
|
||||||
for appid in sorted(disabled):
|
for appid in sorted(disabled):
|
||||||
f.write(appid + '\n')
|
f.write(appid + '\n')
|
||||||
|
Loading…
Reference in New Issue
Block a user