[PATCH 3 of 5 3.27] [ldapfeed] make code compatible with ldap3>=2

Philippe Pepiot philippe.pepiot at logilab.fr
Tue Mar 3 10:58:50 CET 2020


On 27/02/2020, Nicolas Chauvat wrote:
> The info message looks brittle. I would suggest to reorder the lines:
> 
>     def _connect(self, user=None, userpwd=None):
>         protocol, host, port = self.connection_info()
>         kwargs = {}
>         if user:
>             kwargs['user'] = user['dn']
>         elif self.cnx_dn:
>             kwargs['user'] = self.cnx_dn
>             if self.cnx_pwd:
>                 kwargs['password'] = self.cnx_pwd
>         self.info('connecting %s://%s:%s as %s', protocol, host, port,
>                   kwargs.get('user', 'anonymous'))
>         server = ldap3.Server(host, port=int(port))
>         conn = ldap3.Connection(
>             server, client_strategy=ldap3.RESTARTABLE, auto_referrals=False,
>             raise_exceptions=True,
>             **kwargs)

Good catch, I sent a V2 for this, new head is d0ade93

> I read the rest of the pile and it looked good. I did not test it. Do
> you have a link to a jenkins job that ran that code?

https://jenkins.logilab.org/job/cubicweb-3.27/lastCompletedBuild/testReport/
failures are "unrelated well known failures".



More information about the cubicweb-devel mailing list