From c2bd6f365d2b65082f72bd9eb104e79e8c507fe3 Mon Sep 17 00:00:00 2001 From: Jan Cholasta Date: Thu, 31 Oct 2013 16:54:21 +0000 Subject: Convert remaining frontend code to LDAPEntry API. --- ipalib/plugins/sudocmd.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'ipalib/plugins/sudocmd.py') diff --git a/ipalib/plugins/sudocmd.py b/ipalib/plugins/sudocmd.py index 0c2160c8f..35c01aa85 100644 --- a/ipalib/plugins/sudocmd.py +++ b/ipalib/plugins/sudocmd.py @@ -87,10 +87,10 @@ class sudocmd(LDAPObject): self.backend.get_entry(dn, ['']) except errors.NotFound: try: - (dn, entry_attrs) = self.backend.find_entry_by_attr( + entry_attrs = self.backend.find_entry_by_attr( 'sudocmd', keys[-1], self.object_class, [''], - DN(self.container_dn, api.env.basedn) - ) + DN(self.container_dn, api.env.basedn)) + dn = entry_attrs.dn except errors.NotFound: pass return dn @@ -125,7 +125,7 @@ class sudocmd_del(LDAPDelete): except errors.NotFound: pass else: - for entry_dn, entry_attrs in entries: + for entry_attrs in entries: [cn] = entry_attrs['cn'] dependent_sudorules.append(cn) -- cgit