summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Hoffend <dh@dotlan.net>2019-11-26 09:13:26 +0100
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2019-11-26 09:13:26 +0100
commitef261d5b5826c2c0f1a6aa7553cdf2e5cb226383 (patch)
tree58cb14256b563120d34f5425fe4eae802160b46c
parent512cb1c3e60c80240d74eb180a34c3d2930b16ba (diff)
downloadpykolab-ef261d5b5826c2c0f1a6aa7553cdf2e5cb226383.tar.gz
ldap/timeout: always convert to float, fix arguments
Summary: Fixes issue T5692 Reviewers: #pykolab_developers, sicherha Reviewed By: sicherha Subscribers: sicherha Maniphest Tasks: T5692 Differential Revision: https://git.kolab.org/D871
-rw-r--r--pykolab/auth/ldap/__init__.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/pykolab/auth/ldap/__init__.py b/pykolab/auth/ldap/__init__.py
index c5643d9..44019aa 100644
--- a/pykolab/auth/ldap/__init__.py
+++ b/pykolab/auth/ldap/__init__.py
@@ -164,7 +164,7 @@ class LDAP(Base):
log.error(_l("Authentication cache failed: %r") % (errmsg))
retval = False
- timeout = self.config_get('ldap', 'timeout', default=10)
+ timeout = float(self.config_get('ldap', 'timeout', default=10))
if entry_dn is None:
_search = self.ldap.search_ext(
@@ -3041,7 +3041,7 @@ class LDAP(Base):
):
if timeout is None:
- timeout = self.config_get('ldap', 'timeout', 10)
+ timeout = float(self.config_get('ldap', 'timeout', default=10))
log.debug(_l("Searching with filter %r") % (filterstr), level=8)
@@ -3086,7 +3086,7 @@ class LDAP(Base):
"""
if timeout is None:
- timeout = self.config_get('timeout', default=10)
+ timeout = float(self.config_get('ldap', 'timeout', default=10))
supported_controls = conf.get_list('ldap', 'supported_controls')