summaryrefslogtreecommitdiff
path: root/exts
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2020-02-26 14:37:14 +0100
committerMichał Górny <mgorny@gentoo.org>2020-03-02 06:15:25 +0100
commiteb346d01bba1e507085f4e338e1902a7f99d4305 (patch)
tree07197b6398a1944550b8399d6ddbbb21f4bb1727 /exts
parentCover deprecated EAPIs (diff)
downloadpolicy-guide-eb346d01bba1e507085f4e338e1902a7f99d4305.tar.gz
policy-guide-eb346d01bba1e507085f4e338e1902a7f99d4305.tar.bz2
policy-guide-eb346d01bba1e507085f4e338e1902a7f99d4305.zip
Sort Policy Index keys by PGxx identifiers
Signed-off-by: Michał Górny <mgorny@gentoo.org> Closes: https://github.com/gentoo/policy-guide/pull/15 Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'exts')
-rw-r--r--exts/policyident.py4
1 files changed, 3 insertions, 1 deletions
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):