From eb346d01bba1e507085f4e338e1902a7f99d4305 Mon Sep 17 00:00:00 2001 From: Michał Górny Date: Wed, 26 Feb 2020 14:37:14 +0100 Subject: Sort Policy Index keys by PGxx identifiers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michał Górny Closes: https://github.com/gentoo/policy-guide/pull/15 Signed-off-by: Michał Górny --- exts/policyident.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/exts/policyident.py b/exts/policyident.py index 8cdc636..9679bba 100644 --- a/exts/policyident.py +++ b/exts/policyident.py @@ -41,7 +41,9 @@ class PolicyIndex(Index): '', # qualifier '')) # descr - return ([(k, sorted(v)) for k, v in entries.items()], False) + return (sorted([(k, sorted(v)) for k, v in entries.items()], + key=lambda kv: kv[1]), + False) def find_pg_id(section): -- cgit v1.2.3-18-g5258