diff options
author | Tomas Babej <tbabej@redhat.com> | 2012-08-31 05:29:32 -0400 |
---|---|---|
committer | Rob Crittenden <rcritten@redhat.com> | 2012-09-03 21:47:21 -0400 |
commit | 208e6930de94f56264f5964411bbe1b0d6684516 (patch) | |
tree | d1db56c2b00d677b6fd6e3954d3cfae9d2785f42 /ipalib | |
parent | be8a9e6ddbd16fc4b25a6ab895b047d36f3d608e (diff) | |
download | freeipa-208e6930de94f56264f5964411bbe1b0d6684516.tar.gz freeipa-208e6930de94f56264f5964411bbe1b0d6684516.tar.xz freeipa-208e6930de94f56264f5964411bbe1b0d6684516.zip |
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
Diffstat (limited to 'ipalib')
-rw-r--r-- | ipalib/plugins/pwpolicy.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ipalib/plugins/pwpolicy.py b/ipalib/plugins/pwpolicy.py index 33c8329f7..5ae07c40d 100644 --- a/ipalib/plugins/pwpolicy.py +++ b/ipalib/plugins/pwpolicy.py @@ -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 |