summaryrefslogtreecommitdiffstats
path: root/pykolab/auth/ldap/__init__.py
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2011-11-24 21:03:46 +0000
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2011-11-24 21:03:46 +0000
commit50f5c8ab7b7020f6e679cd5a6d965da8017ef48a (patch)
tree2b98e3d8dfd478d6e97f1171a572a4ec18e75439 /pykolab/auth/ldap/__init__.py
parent953f35b331e9c613eecb4a04a713abd982d2cdd0 (diff)
downloadpykolab-50f5c8ab7b7020f6e679cd5a6d965da8017ef48a.tar.gz
Replace setting ldap/uri or <domain>/uri with <domain>/ldap_uri
Diffstat (limited to 'pykolab/auth/ldap/__init__.py')
-rw-r--r--pykolab/auth/ldap/__init__.py13
1 files changed, 10 insertions, 3 deletions
diff --git a/pykolab/auth/ldap/__init__.py b/pykolab/auth/ldap/__init__.py
index 7c447f4..f725d87 100644
--- a/pykolab/auth/ldap/__init__.py
+++ b/pykolab/auth/ldap/__init__.py
@@ -141,12 +141,19 @@ class LDAP(object):
if domain == None:
section = 'ldap'
- elif not conf.has_option(domain, 'uri'):
- section = 'ldap'
+ key = 'uri'
+
+ if conf.has_option(domain, 'uri'):
+ log.warning(_("Deprecation: Setting 'uri' for LDAP in section %s needs to be updated to 'ldap_uri'") %(domain))
+ section = domain
+ key = 'uri'
+ elif conf.has_option(domain, 'ldap_uri'):
+ section = domain
+ key = 'ldap_uri'
log.debug(_("Connecting to LDAP..."), level=8)
- uri = conf.get(section, 'uri')
+ uri = conf.get(section, key)
log.debug(_("Attempting to use LDAP URI %s") %(uri), level=8)