cubicweb/sobjects/ldapparser.py
branch3.23
changeset 11719 36443c44b9a5
parent 11252 6b1d09ef0c45
child 11730 6f303125bfc8
--- a/cubicweb/sobjects/ldapparser.py	Wed Oct 19 15:56:35 2016 +0200
+++ b/cubicweb/sobjects/ldapparser.py	Wed Oct 19 15:57:52 2016 +0200
@@ -25,7 +25,7 @@
 from logilab.common.decorators import cached, cachedproperty
 from logilab.common.shellutils import generate_password
 
-from cubicweb import Binary, ConfigurationError
+from cubicweb import ConfigurationError
 from cubicweb.server.utils import crypt_password
 from cubicweb.server.sources import datafeed
 from cubicweb.dataimport import stores, importer
@@ -149,7 +149,7 @@
                 # generate a dumb password if not fetched from ldap (see
                 # userPassword)
                 pwd = crypt_password(generate_password())
-                attrs['upassword'] = set([Binary(pwd)])
+                attrs['upassword'] = set([pwd])
             extuser = importer.ExtEntity('CWUser', userdict['dn'].encode('ascii'), attrs)
             extuser.values['owned_by'] = set([extuser.extid])
             for extemail in self._process_email(extuser, userdict):