diff options
author | Jason Gerard DeRose <jderose@redhat.com> | 2008-12-20 15:00:00 -0700 |
---|---|---|
committer | Jason Gerard DeRose <jderose@redhat.com> | 2008-12-20 15:00:00 -0700 |
commit | 6fdf5d1e7bb2171646e17cac835be54a4104b5ac (patch) | |
tree | 85c084784809b3592d109a116792a0621130146f /ipalib/plugins/f_pwpolicy.py | |
parent | 9a69adeef001ddd0c55513271cf02eedc0a9aef8 (diff) | |
parent | c025ed6404e147f19b71b398e920fd1b3a05452a (diff) | |
download | freeipa.git-6fdf5d1e7bb2171646e17cac835be54a4104b5ac.tar.gz freeipa.git-6fdf5d1e7bb2171646e17cac835be54a4104b5ac.tar.xz freeipa.git-6fdf5d1e7bb2171646e17cac835be54a4104b5ac.zip |
Merge branch 'master' of git://git.engineering.redhat.com/users/rcritten/freeipa2
Diffstat (limited to 'ipalib/plugins/f_pwpolicy.py')
-rw-r--r-- | ipalib/plugins/f_pwpolicy.py | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/ipalib/plugins/f_pwpolicy.py b/ipalib/plugins/f_pwpolicy.py index ce52e467..87a7d8fa 100644 --- a/ipalib/plugins/f_pwpolicy.py +++ b/ipalib/plugins/f_pwpolicy.py @@ -88,9 +88,8 @@ class pwpolicy_mod(frontend.Command): return ldap.update(dn, **kw) - def output_for_cli(self, ret): - if ret: - print "Policy modified" + def output_for_cli(self, textui, result, *args, **options): + textui.print_plain("Policy modified") api.register(pwpolicy_mod) @@ -120,14 +119,12 @@ class pwpolicy_show(frontend.Command): return policy - def output_for_cli(self, policy): - if not policy: return - - print "Password Policy" - print "Min. Password Lifetime (hours): %s" % policy.get('krbminpwdlife') - print "Max. Password Lifetime (days): %s" % policy.get('krbmaxpwdlife') - print "Min. Number of Character Classes: %s" % policy.get('krbpwdmindiffchars') - print "Min. Length of Password: %s" % policy.get('krbpwdminlength') - print "Password History Size: %s" % policy.get('krbpwdhistorylength') + def output_for_cli(self, textui, result, *args, **options): + textui.print_plain("Password Policy") + textui.print_plain("Min. Password Lifetime (hours): %s" % result.get('krbminpwdlife')) + textui.print_plain("Max. Password Lifetime (days): %s" % result.get('krbmaxpwdlife')) + textui.print_plain("Min. Number of Character Classes: %s" % result.get('krbpwdmindiffchars')) + textui.print_plain("Min. Length of Password: %s" % result.get('krbpwdminlength')) + textui.print_plain("Password History Size: %s" % result.get('krbpwdhistorylength')) api.register(pwpolicy_show) |