From ae7d33c26779bb33eca61feb6a9f4f7e552b544b Mon Sep 17 00:00:00 2001 From: Antoine Durand-gasselin Date: Sun, 17 Oct 2010 22:45:27 +0200 Subject: [PATCH] =?UTF-8?q?[lc=5Fldap]=20penser=20=C3=A0=20stocker=20le=20?= =?UTF-8?q?bind=5Fdn=20=20[attributs]=20typo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- attributs.py | 2 +- lc_ldap.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/attributs.py b/attributs.py index 399e43c..2d62bc9 100644 --- a/attributs.py +++ b/attributs.py @@ -533,7 +533,7 @@ class controle(Attr): def parse_value(self, ctrl, ldif): if ctrl not in [u"", u"c", u"p", u"cp", u"pc"]: raise ValueError("control peut prendre les valeurs [c][p]") - if ctrl = u'pc': + if ctrl == u'pc': self.value = u'cp' else: self.value = ctrl diff --git a/lc_ldap.py b/lc_ldap.py index 8696f05..df1741a 100644 --- a/lc_ldap.py +++ b/lc_ldap.py @@ -114,6 +114,8 @@ class lc_ldap(ldap.ldapobject.LDAPObject): self.conn = self.bind_s(dn, cred) else: self.conn = self.simple_bind_s() + self.bind_dn = dn + self.droits = [] # Penser à stocker les droits du bind_dn :) def search(self, filterstr, mode='ro', dn= base_dn, scope= 2, sizelimit=400): res = self.search_ext_s(dn, scope, filterstr, sizelimit=sizelimit)