Module: check_mk
Branch: master
Commit: 1269614e0177ff070252cd048a6ad0a05d094d07
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=1269614e0177ff…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Sep 5 14:58:59 2016 +0200
Fixed exception when trying to synchronize user profile changes to remote sites
---
web/plugins/userdb/ldap.py | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/web/plugins/userdb/ldap.py b/web/plugins/userdb/ldap.py
index c04eca8..1ea0557 100644
--- a/web/plugins/userdb/ldap.py
+++ b/web/plugins/userdb/ldap.py
@@ -1818,16 +1818,18 @@ ldap_attribute_plugins['groups_to_roles'] = {
def synchronize_profile_to_sites(connection, user_id, profile):
import sites
import wato # FIXME: Cleanup!
- sites = [(site_id, config.site(site_id))
- for site_id in config.sitenames()
- if not config.site_is_local(site_id) ]
- connection.log('Credentials changed: %s. Trying to sync to %d sites' %
(user_id, len(sites)))
+ remote_sites = [(site_id, config.site(site_id))
+ for site_id in config.sitenames()
+ if not config.site_is_local(site_id) ]
+
+ connection.log('Credentials changed: %s. Trying to sync to %d sites' %
+ (user_id, len(sites)))
num_disabled = 0
num_succeeded = 0
num_failed = 0
- for site_id, site in sites:
+ for site_id, site in remote_sites:
if not site.get("replication"):
num_disabled += 1
continue