chiark / gitweb /
Fix new downloads-per-version stats
authorCiaran Gultnieks <ciaran@ciarang.com>
Thu, 23 Jan 2014 23:31:03 +0000 (23:31 +0000)
committerCiaran Gultnieks <ciaran@ciarang.com>
Thu, 23 Jan 2014 23:31:03 +0000 (23:31 +0000)
fdroidserver/stats.py

index a98ed3004a8f7e8b41f32adc1f1967a7096a9c50..3b69082d547bee889a6f2e8a0eb634f9035e33f1 100644 (file)
@@ -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...