diff options
author | Jan Cholasta <jcholast@redhat.com> | 2013-10-31 16:54:21 +0000 |
---|---|---|
committer | Petr Viktorin <pviktori@redhat.com> | 2014-01-24 20:38:15 +0100 |
commit | c2bd6f365d2b65082f72bd9eb104e79e8c507fe3 (patch) | |
tree | 31449afe21beb62edf20982c2215568997eb6c11 /ipalib/plugins/netgroup.py | |
parent | 5737eaf1348ba101ae227fa79fb4451a2413fc84 (diff) | |
download | freeipa-c2bd6f365d2b65082f72bd9eb104e79e8c507fe3.tar.gz freeipa-c2bd6f365d2b65082f72bd9eb104e79e8c507fe3.tar.xz freeipa-c2bd6f365d2b65082f72bd9eb104e79e8c507fe3.zip |
Convert remaining frontend code to LDAPEntry API.
Diffstat (limited to 'ipalib/plugins/netgroup.py')
-rw-r--r-- | ipalib/plugins/netgroup.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ipalib/plugins/netgroup.py b/ipalib/plugins/netgroup.py index 84bc74981..e454b9aa3 100644 --- a/ipalib/plugins/netgroup.py +++ b/ipalib/plugins/netgroup.py @@ -167,7 +167,7 @@ class netgroup_add(LDAPCreate): try: test_dn = self.obj.get_dn(keys[-1]) - (test_dn_, netgroup) = ldap.get_entry(test_dn, ['objectclass']) + netgroup = ldap.get_entry(test_dn, ['objectclass']) if 'mepManagedEntry' in netgroup.get('objectclass', []): raise errors.DuplicateEntry(message=unicode(self.msg_collision % keys[-1])) else: @@ -206,7 +206,8 @@ class netgroup_mod(LDAPUpdate): def pre_callback(self, ldap, dn, entry_attrs, attrs_list, *keys, **options): assert isinstance(dn, DN) try: - (dn, entry_attrs) = ldap.get_entry(dn, attrs_list) + entry_attrs = ldap.get_entry(dn, attrs_list) + dn = entry_attrs.dn except errors.NotFound: self.obj.handle_not_found(*keys) if is_all(options, 'usercategory') and 'memberuser' in entry_attrs: |