summaryrefslogtreecommitdiffstats
path: root/pykolab/auth/ldap/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'pykolab/auth/ldap/__init__.py')
-rw-r--r--pykolab/auth/ldap/__init__.py30
1 files changed, 18 insertions, 12 deletions
diff --git a/pykolab/auth/ldap/__init__.py b/pykolab/auth/ldap/__init__.py
index 29448a5..e0118d1 100644
--- a/pykolab/auth/ldap/__init__.py
+++ b/pykolab/auth/ldap/__init__.py
@@ -889,18 +889,24 @@ class LDAP(pykolab.base.Base):
log.debug(_("Synchronization is searching against base DN: %s") % (base_dn), level=8)
- self._search(
- base_dn,
- filterstr=_filter,
- attrlist=[
- '*',
- self.config_get('unique_attribute'),
- conf.get('cyrus-sasl', 'result_attribute'),
- 'modifytimestamp'
- ],
- override_search=override_search,
- callback=self._synchronize_callback,
- )
+ try:
+ self._search(
+ base_dn,
+ filterstr=_filter,
+ attrlist=[
+ '*',
+ self.config_get('unique_attribute'),
+ conf.get('cyrus-sasl', 'result_attribute'),
+ 'modifytimestamp'
+ ],
+ override_search=override_search,
+ callback=self._synchronize_callback,
+ )
+ except Exception, errmsg:
+ log.error("Exception occurred: %r" % (errmsg))
+ if conf.debuglevel > 8:
+ import traceback
+ traceback.print_exc()
def user_quota(self, entry_id, folder):
default_quota = self.config_get('default_quota')