From f6b1128274fbd6c12a308c8921a496f3f9c657b6 Mon Sep 17 00:00:00 2001 From: kakwa Date: Sat, 25 Jul 2015 22:02:53 +0200 Subject: [PATCH] adding more debug traces in case of a faulty backend --- ldapcherry/__init__.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ldapcherry/__init__.py b/ldapcherry/__init__.py index 4935d76..a1cee82 100644 --- a/ldapcherry/__init__.py +++ b/ldapcherry/__init__.py @@ -188,11 +188,12 @@ class LdapCherry(object): # Loading the backend module try: module = params['module'] - except: + except Exception as e: raise MissingParameter('backends', backend + '.module') try: bc = __import__(module, globals(), locals(), ['Backend'], -1) - except: + except Exception as e: + self._handle_exception(e) raise BackendModuleLoadingFail(module) try: attrslist = self.attributes.get_backend_attributes(backend) @@ -206,7 +207,8 @@ class LdapCherry(object): ) except MissingParameter as e: raise e - except: + except Exception as e: + self._handle_exception(e) raise BackendModuleInitFail(module) def _init_ppolicy(self, config):