Module: check_mk
Branch: master
Commit: 2da655dd60b6a68e066cf58860b7ea6f69357da5
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=2da655dd60b6a6…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Sep 20 12:22:23 2013 +0200
Fixed exception on ldap test page
---
web/htdocs/wato.py | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index c059b11..d743b89 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -5516,14 +5516,13 @@ def mode_ldap_config(phase):
userdb.ldap_connect(enforce_new = True, enforce_server = address)
try:
ldap_users = userdb.ldap_get_users()
+ msg = _('Found no user object for synchronization. Please check your
filter settings.')
except Exception, e:
ldap_users = None
msg = str(e)
if ldap_users and len(ldap_users) > 0:
return (True, _('Found %d users for synchronization.') %
len(ldap_users))
else:
- if not msg:
- msg = _('Found no user object for synchronization. Please check
your filter settings.')
return (False, msg)
def test_group_base_dn(address):
@@ -5537,14 +5536,13 @@ def mode_ldap_config(phase):
userdb.ldap_connect(enforce_new = True, enforce_server = address)
try:
ldap_groups = userdb.ldap_get_groups()
+ msg = _('Found no group object for synchronization. Please check your
filter settings.')
except Exception, e:
ldap_groups = None
msg = str(e)
if ldap_groups and len(ldap_groups) > 0:
return (True, _('Found %d groups for synchronization.') %
len(ldap_groups))
else:
- if not msg:
- msg = _('Found no group object for synchronization. Please check
your filter settings.')
return (False, msg)
tests = [