simpler cmp function for polgroups

This commit is contained in:
Frédéric Péters 2011-12-04 20:35:12 +01:00
parent 2648a76447
commit 615e913ef8
1 changed files with 1 additions and 1 deletions

View File

@ -307,7 +307,7 @@ def possible_polgroups(context):
else:
inactive_groups.append(SimpleVocabulary.createTerm(polgroup_id, polgroup_id, polgroup_str))
# keep active groups ordered by their position
inactive_groups.sort(cmp_term)
inactive_groups.sort(lambda x,y: cmp(x.value, y.value))
return SimpleVocabulary(active_groups + inactive_groups)
@grok.provider(IContextSourceBinder)