--- a/server/sources/ldapuser.py Fri Nov 05 18:48:07 2010 +0100
+++ b/server/sources/ldapuser.py Fri Nov 12 13:47:26 2010 +0100
@@ -369,8 +369,14 @@
try:
results = self._query_cache[rqlkey]
except KeyError:
- results = self.rqlst_search(session, rqlst, args)
- self._query_cache[rqlkey] = results
+ try:
+ results = self.rqlst_search(session, rqlst, args)
+ self._query_cache[rqlkey] = results
+ except ldap.SERVER_DOWN:
+ # cant connect to server
+ msg = session._("can't connect to source %s, some data may be missing")
+ session.set_shared_data('sources_error', msg % self.uri)
+ return []
return results
def rqlst_search(self, session, rqlst, args):