Fix of issue 2504 for People View.

svn: r11317
This commit is contained in:
Peter Landgren 2008-11-19 19:41:04 +00:00
parent 6dd2f7205c
commit 5d441bf292

View File

@ -68,14 +68,6 @@ from Lru import LRU
_CACHE_SIZE = 250 _CACHE_SIZE = 250
invalid_date_format = Config.get(Config.INVALID_DATE_FORMAT) invalid_date_format = Config.get(Config.INVALID_DATE_FORMAT)
def locale_sort(mylist):
"""
Normal sort routine
"""
l = [ (locale.strxfrm(x),x) for x in mylist ]
l.sort()
return [ x[1] for x in l ]
class NodeTreeMap: class NodeTreeMap:
def __init__(self): def __init__(self):
@ -100,7 +92,9 @@ class NodeTreeMap:
self.temp_sname_sub = {} self.temp_sname_sub = {}
def build_toplevel(self): def build_toplevel(self):
self.temp_top_path2iter = locale_sort(self.temp_sname_sub.keys()) mylist = self.temp_sname_sub.keys()
mylist.sort(locale.strcoll)
self.temp_top_path2iter = mylist
for name in self.temp_top_path2iter: for name in self.temp_top_path2iter:
self.build_sub_entry(name) self.build_sub_entry(name)