From bb36683c8480a68d54ef632daa0a4d6df9802187 Mon Sep 17 00:00:00 2001 From: Jan Cholasta Date: Thu, 31 Jan 2013 11:19:13 +0100 Subject: Use the dn attribute of LDAPEntry to set/get DNs of entries. Convert all code that uses the 'dn' key of LDAPEntry for this to use the dn attribute instead. --- ipalib/plugins/sudorule.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'ipalib/plugins/sudorule.py') diff --git a/ipalib/plugins/sudorule.py b/ipalib/plugins/sudorule.py index a453dcab..8eea7732 100644 --- a/ipalib/plugins/sudorule.py +++ b/ipalib/plugins/sudorule.py @@ -642,7 +642,9 @@ class sudorule_add_option(LDAPQuery): dn, attrs_list, normalize=self.obj.normalize_dn ) - return dict(result=dict(entry_attrs)) + entry_attrs = entry_to_dict(entry_attrs, **options) + + return dict(result=entry_attrs) def output_for_cli(self, textui, result, cn, **options): textui.print_dashed(_('Added option "%(option)s" to Sudo Rule "%(rule)s"') % \ @@ -697,7 +699,9 @@ class sudorule_remove_option(LDAPQuery): dn, attrs_list, normalize=self.obj.normalize_dn ) - return dict(result=dict(entry_attrs)) + entry_attrs = entry_to_dict(entry_attrs, **options) + + return dict(result=entry_attrs) def output_for_cli(self, textui, result, cn, **options): textui.print_dashed(_('Removed option "%(option)s" from Sudo Rule "%(rule)s"') % \ -- cgit