import time
from datetime import datetime
import re
-import sets
import json
import operator
'etch': 'Debian GNU/Linux 4.0 (etch)',
'lenny': 'Debian GNU/Linux 5.0 (lenny)',
'squeeze': 'Debian GNU/Linux 6.0 (squeeze)',
- 'wheezy': 'Debian testing (wheezy)',
+ 'wheezy': 'Debian GNU/Linux 7.0 (wheezy)',
+ 'jessie': 'Debian testing (jessie)',
'sid': 'Debian unstable (sid)',
'hardy': 'Ubuntu 08.04 LTS "Hardy Heron" (hardy)',
'jaunty': 'Ubuntu 09.04 "Jaunty Jackalope" (jaunty)',
'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)',
}
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)]}