##// END OF EJS Templates
scripts: fix crash from comparing integer with empty list...
Mads Kiilerich -
r8179:d6ccf6a9 default
parent child Browse files
Show More
@@ -52,10 +52,13 b' def sortkey(x):'
52 52 * number of contribution years
53 53 * name (with some unicode normalization)
54 54 The entries must be 2-tuples of a list of string years and the name"""
55 return (x[0] and -int(x[0][-1]),
56 x[0] and int(x[0][0]),
57 -len(x[0]),
58 x[1].decode('utf-8').lower().replace('\xe9', 'e').replace('\u0142', 'l')
55 years, name = x
56 if not years:
57 years = ['0']
58 return (-int(years[-1]), # primarily sort by latest contribution
59 int(years[0]), # then sort by first contribution
60 -len(years), # then sort by length of contribution (no gaps)
61 name.lower().replace('\xe9', 'e').replace('\u0142', 'l') # finally sort by name
59 62 )
60 63
61 64
General Comments 0
You need to be logged in to leave comments. Login now