summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrédéric Péters <fpeters@entrouvert.com>2020-01-19 18:16:18 (GMT)
committerFrédéric Péters <fpeters@entrouvert.com>2020-03-17 18:06:44 (GMT)
commitb562bef51fe10a9d8d0f538ad05cb028bbc04325 (patch)
tree4ca7b69c03098df91c3de230060e6588c8b6cecc
parenta8e12b9630b7958d9f09021103d52bf4f32e1bff (diff)
downloadwelco-b562bef51fe10a9d8d0f538ad05cb028bbc04325.zip
welco-b562bef51fe10a9d8d0f538ad05cb028bbc04325.tar.gz
welco-b562bef51fe10a9d8d0f538ad05cb028bbc04325.tar.bz2
python3: use key function to sort categories (#39092)
-rw-r--r--welco/utils.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/welco/utils.py b/welco/utils.py
index 6f92139..7d26ff4 100644
--- a/welco/utils.py
+++ b/welco/utils.py
@@ -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):