1
0
mirror of https://github.com/kakwa/ldapcherry synced 2024-11-22 01:14:21 +01:00

fix more encoding error

This commit is contained in:
kakwa 2015-07-28 23:57:14 +02:00
parent 49af82d308
commit 3391ed9704

View File

@ -274,11 +274,11 @@ class Backend(ldapcherry.backend.Backend):
attrs_str['objectClass'] = self.objectclasses
dn = \
self.dn_user_attr +\
self._str(self.dn_user_attr) +\
'=' +\
self._str(attrs[self.dn_user_attr]) +\
',' +\
self.userdn
self._str(self.userdn)
ldif = modlist.addModlist(attrs_str)
try:
ldap_client.add_s(dn, ldif)
@ -289,7 +289,7 @@ class Backend(ldapcherry.backend.Backend):
def del_user(self, username):
ldap_client = self._bind()
dn = self._get_user(username, NO_ATTR)
dn = self._str(self._get_user(username, NO_ATTR))
if dn is not None:
ldap_client.delete_s(dn)
else: