mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Sort policies numerically in pwpolicy-find
Password policies in pwpolicy-find are now sorted in the expected numerical manner. Also tweaks one of the unit tests so that it tests this behaviour. https://fedorahosted.org/freeipa/ticket/3039
This commit is contained in:
committed by
Rob Crittenden
parent
be8a9e6ddb
commit
208e6930de
@@ -481,7 +481,7 @@ class pwpolicy_find(LDAPSearch):
|
||||
# policies with higher priority (lower number) will be at the
|
||||
# beginning of the list
|
||||
try:
|
||||
cospriority = entry[1]['cospriority'][0]
|
||||
cospriority = int(entry[1]['cospriority'][0])
|
||||
except KeyError:
|
||||
# if cospriority is not present in the entry, rather return 0
|
||||
# than crash
|
||||
|
||||
Reference in New Issue
Block a user