mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-24 11:42:52 +01:00
Changed the sorting function.
This commit is contained in:
parent
3319e2562d
commit
0ddb356c0b
@ -196,12 +196,12 @@ class Group(object):
|
||||
def getValues(self, askChildren=False):
|
||||
L = []
|
||||
items = self.values.items()
|
||||
items.sort()
|
||||
utils.sortBy(lambda (k, _): (k.lower(), len(k), k), items)
|
||||
for (name, value) in items:
|
||||
L.append(('%s.%s' % (self.getName(), name), str(value)))
|
||||
if askChildren:
|
||||
items = self.children.items()
|
||||
items.sort()
|
||||
utils.sortBy(lambda (k, _): (k.lower(), len(k), k), items)
|
||||
for (_, child) in items:
|
||||
L.extend(child.getValues(askChildren))
|
||||
return L
|
||||
|
Loading…
Reference in New Issue
Block a user