]> git.donarmstrong.com Git - neurodebian.git/blobdiff - tools/nd_apachelogs2subscriptionstats
Also for stats report which repo and which job number use our setup
[neurodebian.git] / tools / nd_apachelogs2subscriptionstats
index ff26946efb695623bdfb9b9166584808c02a14ae..a2a3f469ce897a689835b099f62b9cdd16b99697 100755 (executable)
@@ -7,7 +7,6 @@ import sys
 import time
 from datetime import datetime
 import re
-import sets
 import json
 import operator
 
@@ -30,6 +29,7 @@ releases = {
     'quantal': 'Ubuntu 12.10 "Quantal Quetzal" (quantal)',
     'raring': 'Ubuntu 13.04 "Raring Ringtail" (raring)',
     'saucy': 'Ubuntu 13.10 "Saucy Salamander" (saucy)',
+    'trusty': 'Ubuntu 14.04 "Trusty Tahr" (trusty)',
 }
 
 
@@ -61,9 +61,9 @@ if __name__ == '__main__':
         rstats[date] = rtime
         data[releases[release]] = rstats
     # determine the union of all timestamps
-    timestamps = sets.Set()
+    timestamps = set()
     for codename, stats in data.iteritems():
-        timestamps.union_update(stats.keys())
+        timestamps.update(stats.keys())
     export = [{'key': release,
                'values': [[ts, float(data[release].setdefault(ts, 0)) / 7]
                         for ts in sorted(timestamps)]}