--- a/contrib/synthrepo.py Tue Nov 27 22:24:02 2012 +0100 +++ b/contrib/synthrepo.py Mon Dec 10 11:18:03 2012 -0800 @@ -231,6 +231,8 @@ fp.close() def cdf(l): + if not l: + return [], [] vals, probs = zip(*sorted(l, key=lambda x: x[1], reverse=True)) t = float(sum(probs, 0)) s, cdfs = 0, []