--- 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