From: Ciaran Gultnieks Date: Thu, 23 Jan 2014 23:31:03 +0000 (+0000) Subject: Fix new downloads-per-version stats X-Git-Tag: 0.2~373 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=80b29453a5d435c8340461591a50d5bf4699d4a2;p=fdroidserver.git Fix new downloads-per-version stats --- diff --git a/fdroidserver/stats.py b/fdroidserver/stats.py index a98ed300..3b69082d 100644 --- a/fdroidserver/stats.py +++ b/fdroidserver/stats.py @@ -162,8 +162,11 @@ def main(): f = open('stats/total_downloads_app_version.txt', 'w') f.write('# Total downloads by application and version, since October 2011\n') - for appVer, count in sorted(appsVer): - f.write(appVer + ' ' + str(count) + '\n') + lst = [] + for appver, count in appsVer.iteritems(): + lst.append(appver + " " + str(count)) + for line in sorted(lst): + f.write(line + "\n") f.close() # Calculate and write stats for repo types...