python3: use key function to sort categories (#39092)

This commit is contained in:
Frédéric Péters 2020-01-19 19:16:18 +01:00
parent a8e12b9630
commit b562bef51f
1 changed files with 1 additions and 1 deletions

View File

@ -100,7 +100,7 @@ def get_wcs_options(url, condition=None, params={}):
categories[category_key].append((reference, title))
options = []
for category in sorted(categories.keys()):
options.append((category, sorted(categories[category], lambda x, y: cmp(x[1], y[1]))))
options.append((category, sorted(categories[category], key=lambda x: x[1])))
return options
def get_wcs_formdef_details(formdef_reference):