From 3391ed97049758dc4c1af09e11fe2ab743b30052 Mon Sep 17 00:00:00 2001 From: kakwa Date: Tue, 28 Jul 2015 23:57:14 +0200 Subject: [PATCH] fix more encoding error --- ldapcherry/backend/backendLdap.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ldapcherry/backend/backendLdap.py b/ldapcherry/backend/backendLdap.py index a68cb7b..cf3b8f1 100644 --- a/ldapcherry/backend/backendLdap.py +++ b/ldapcherry/backend/backendLdap.py @@ -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: