Author: fw Date: 2005-10-20 09:00:51 +0000 (Thu, 20 Oct 2005) New Revision: 2477 Modified: lib/python/bugs.py Log: r262@deneb: fw | 2005-09-29 21:08:13 +0200 lib/python/bugs.py (Bugs.mergeNotes): Deal with "None" releases in the sorting code. Modified: lib/python/bugs.py ==================================================================--- lib/python/bugs.py 2005-10-20 08:57:39 UTC (rev 2476) +++ lib/python/bugs.py 2005-10-20 09:00:51 UTC (rev 2477) @@ -353,7 +353,18 @@ else: notes[key] = n l = notes.keys() - l.sort() + + # The release part of a key can be None, so we have to deal + # with that when sorting. + def compare(a, b): + r = cmp(a[0], b[0]) + if r: + return r + ar = str(a[1] or '''') + br = str(b[1] or '''') + return cmp(ar, br) + l.sort(compare) + nts = [] for key in l: nts.append(notes[key])