summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-09-13 14:04:07 +0100
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-09-13 14:04:54 +0100
commit7b4888f9118966593408560a92e8162c52f2c5d0 (patch)
tree79d05079d9d42c19ce33dedb96b9a31e90e25ac5
parentd00412cf9c84152cf6f4ba7f1542ecc7e9ecbd4b (diff)
downloadpykolab-7b4888f9118966593408560a92e8162c52f2c5d0.tar.gz
Only actually fail listing domains if the primary domain is the domain auth has been instantiated for (#1004)
-rw-r--r--pykolab/auth/__init__.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/pykolab/auth/__init__.py b/pykolab/auth/__init__.py
index b8e0d3b..359a0f6 100644
--- a/pykolab/auth/__init__.py
+++ b/pykolab/auth/__init__.py
@@ -223,7 +223,11 @@ class Auth(pykolab.base.Base):
# Find the domains in the authentication backend.
kolab_primary_domain = conf.get('kolab', 'primary_domain')
- domains = self._auth._list_domains()
+ try:
+ domains = self._auth._list_domains()
+ except:
+ if not self.domain == kolab_primary_domain:
+ return [(self.domain, [])]
# If no domains are found, the primary domain is used.
if len(domains) < 1: