From 0dbec4fa62beebdb173f58aec5dee6a40ffa967d Mon Sep 17 00:00:00 2001 From: Laurent Peuch Date: Wed, 6 Sep 2017 22:00:17 +0200 Subject: [PATCH] [enh] add debugging in ldap init (#365) --- src/yunohost/tools.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/yunohost/tools.py b/src/yunohost/tools.py index e172fa8e5..22ac7894f 100644 --- a/src/yunohost/tools.py +++ b/src/yunohost/tools.py @@ -78,14 +78,14 @@ def tools_ldapinit(): for rdn, attr_dict in ldap_map['parents'].items(): try: auth.add(rdn, attr_dict) - except: - pass + except Exception as e: + 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(): try: auth.add(rdn, attr_dict) - except: - pass + except Exception as e: + logger.warn("Error when trying to inject '%s' -> '%s' into ldap: %s" % (rdn, attr_dict, e)) admin_dict = { 'cn': 'admin',