From 463896ffc3bebc400a9faaff4a16854be44a1083 Mon Sep 17 00:00:00 2001 From: Olivier Iffrig Date: Tue, 30 Nov 2010 23:08:33 +0100 Subject: [PATCH] =?UTF-8?q?[lc=5Fldap]=20Scopes=20appropri=C3=A9s=20pour?= =?UTF-8?q?=20la=20recherche=20dans=20l'historique?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lc_ldap.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lc_ldap.py b/lc_ldap.py index 7b5896d..babbe15 100644 --- a/lc_ldap.py +++ b/lc_ldap.py @@ -335,7 +335,7 @@ class CransLdapObject(object): l'argument optionnel ign_fields contient la liste des champs à ignorer, HIST_IGNORE_FIELDS par défaut Renvoie une liste de lignes de texte.""" - res = self.conn.search_s(log_dn, 2, 'reqDN=%s' % self.dn) + res = self.conn.search_s(log_dn, ldap.SCOPE_SUBTREE, 'reqDN=%s' % self.dn) res.sort(key=(lambda a: a[1]['reqEnd'][0])) out = [] for cn, attrs in res: @@ -345,7 +345,7 @@ class CransLdapObject(object): author = u"respbats" else: author = author.split(",", 1)[0] - res = self.conn.search(author) + res = self.conn.search(author, scope=ldap.SCOPE_ONELEVEL) if res != []: author = res[0].compte()