server/ldaputils.py
changeset 8430 5bee87a14bb1
parent 8387 b59af20a868d
child 8473 2646a8e99b0d
--- a/server/ldaputils.py	Fri May 25 17:18:00 2012 +0200
+++ b/server/ldaputils.py	Thu May 31 15:56:21 2012 +0200
@@ -225,11 +225,12 @@
     def object_exists_in_ldap(self, dn):
         cnx = self.get_connection().cnx #session.cnxset.connection(self.uri).cnx
         if cnx is None:
-            return True # ldap unreachable, suppose it exists
+            self.warning('Could not establish connexion with LDAP server, assuming dn %s exists', dn)
+            return True # ldap unreachable, let's not touch it
         try:
             cnx.search_s(dn, self.user_base_scope)
         except ldap.PARTIAL_RESULTS:
-            pass
+            self.warning('PARTIAL RESULTS for dn %s', dn)
         except ldap.NO_SUCH_OBJECT:
             return False
         return True