[enh] add debugging in ldap init (#365)

This commit is contained in:
Laurent Peuch 2017-09-06 22:00:17 +02:00 committed by Alexandre Aubin
parent a6639c4530
commit 0dbec4fa62

View file

@ -78,14 +78,14 @@ def tools_ldapinit():
for rdn, attr_dict in ldap_map['parents'].items(): for rdn, attr_dict in ldap_map['parents'].items():
try: try:
auth.add(rdn, attr_dict) auth.add(rdn, attr_dict)
except: except Exception as e:
pass logger.warn("Error when trying to inject '%s' -> '%s' into ldap: %s" % (rdn, attr_dict, e))
for rdn, attr_dict in ldap_map['children'].items(): for rdn, attr_dict in ldap_map['children'].items():
try: try:
auth.add(rdn, attr_dict) auth.add(rdn, attr_dict)
except: except Exception as e:
pass logger.warn("Error when trying to inject '%s' -> '%s' into ldap: %s" % (rdn, attr_dict, e))
admin_dict = { admin_dict = {
'cn': 'admin', 'cn': 'admin',