[ldapuser] quieter ldap result info, fix commented block style stable
authorAurelien Campeas <aurelien.campeas@logilab.fr>
Fri, 18 Jun 2010 13:32:54 +0200
branchstable
changeset 5789 0f969e5c579a
parent 5786 7c16a4e7a592
child 5791 274a5a6080a7
[ldapuser] quieter ldap result info, fix commented block style
server/sources/ldapuser.py
--- a/server/sources/ldapuser.py	Fri Jun 18 09:25:01 2010 +0200
+++ b/server/sources/ldapuser.py	Fri Jun 18 13:32:54 2010 +0200
@@ -520,12 +520,12 @@
                 self.repo.delete_info(session, entity, self.uri, base)
                 self.reset_cache()
             return []
-##         except ldap.REFERRAL, e:
-##             cnx = self.handle_referral(e)
-##             try:
-##                 res = cnx.search_s(base, scope, searchstr, attrs)
-##             except ldap.PARTIAL_RESULTS:
-##                 res_type, res = cnx.result(all=0)
+        # except ldap.REFERRAL, e:
+        #     cnx = self.handle_referral(e)
+        #     try:
+        #         res = cnx.search_s(base, scope, searchstr, attrs)
+        #     except ldap.PARTIAL_RESULTS:
+        #         res_type, res = cnx.result(all=0)
         result = []
         for rec_dn, rec_dict in res:
             # When used against Active Directory, "rec_dict" may not be
@@ -553,7 +553,7 @@
             self._cache[rec_dn] = rec_dict
             result.append(rec_dict)
         #print '--->', result
-        self.info('ldap built results %s', result)
+        self.info('ldap built results %s', len(result))
         return result
 
     def before_entity_insertion(self, session, lid, etype, eid):