From b562bef51fe10a9d8d0f538ad05cb028bbc04325 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Sun, 19 Jan 2020 19:16:18 +0100 Subject: [PATCH] python3: use key function to sort categories (#39092) --- welco/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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):