server/sources/ldapuser.py
changeset 6653 52d1568af412
parent 6427 c8a5ac2d1eaa
child 6693 65bd93b72f1e
--- a/server/sources/ldapuser.py	Tue Oct 26 20:22:30 2010 +0200
+++ b/server/sources/ldapuser.py	Wed Oct 27 08:51:50 2010 +0200
@@ -266,7 +266,10 @@
     def get_connection(self):
         """open and return a connection to the source"""
         if self._conn is None:
-            self._connect()
+            try:
+                self._connect()
+            except:
+                self.exception('cant connect to ldap')
         return ConnectionWrapper(self._conn)
 
     def authenticate(self, session, login, password=None, **kwargs):