fix more encoding error

This commit is contained in:
kakwa 2015-07-28 23:57:14 +02:00
parent 49af82d308
commit 3391ed9704
1 changed files with 3 additions and 3 deletions

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: