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.
This commit is contained in:
Jan Cholasta
2013-01-31 11:19:13 +01:00
committed by Martin Kosek
parent 982b782777
commit bb36683c84
11 changed files with 74 additions and 44 deletions

View File

@@ -476,7 +476,6 @@ class ldap2(LDAPClient, CrudBackend):
assert isinstance(dn, DN)
(dn, entry_attrs) = self.get_entry(dn, attrs_list)
entry_attrs['dn'] = dn
return entry_attrs
def create(self, **kw):
@@ -552,7 +551,6 @@ class ldap2(LDAPClient, CrudBackend):
filter, attrs_list, base_dn, scope
)
for (dn, entry_attrs) in entries:
entry_attrs['dn'] = [dn]
output.append(entry_attrs)
if truncated: