Don't look up the CoS entry with the global password policy.

ticket 523
This commit is contained in:
Rob Crittenden committed 2010-12-03 13:51:01 -05:00
1 parent 8a63315ef3
commit 0ca29095a8
1 file changed
+2 -2
+2 -2
View File
@@ -419,7 +419,7 @@ class pwpolicy_show(LDAPRetrieve):
def post_callback(self, ldap, dn, entry_attrs, *keys, **options):
if not options.get('raw', False):
if keys[-1] is not None:
if keys[-1] is not None and keys[-1] != 'global_policy':
try:
cos_entry = self.api.Command.cosentry_show(
keys[-1]
@@ -429,7 +429,7 @@ class pwpolicy_show(LDAPRetrieve):
except errors.NotFound:
pass
if options.get('rights', False) and options.get('all', False) and \
keys[-1] is not None:
(keys[-1] is not None and keys[-1] != 'global_policy'):
cos_entry = self.api.Command.cosentry_show(keys[-1], rights=True, all=True)['result']
entry_attrs['attributelevelrights']['cospriority'] = cos_entry['attributelevelrights']['cospriority']
self.obj.convert_time_for_output(entry_attrs, **options)