From: Frank Brehm Date: Fri, 11 Nov 2022 08:51:23 +0000 (+0100) Subject: Bugfixing X-Git-Tag: 0.7.2^2^2~13 X-Git-Url: https://git.uhu-banane.net/?a=commitdiff_plain;h=3828ca2496c5dc375b2a7d8d075355d57f3a1576;p=pixelpark%2Fpp-admin-tools.git Bugfixing --- diff --git a/lib/pp_admintools/app/ldap.py b/lib/pp_admintools/app/ldap.py index aec3562..11bde02 100644 --- a/lib/pp_admintools/app/ldap.py +++ b/lib/pp_admintools/app/ldap.py @@ -54,7 +54,7 @@ from ..config.ldap import LdapConnectionInfo, LdapConfiguration # rom ..config.ldap import DEFAULT_PORT_LDAP, DEFAULT_PORT_LDAPS from ..config.ldap import DEFAULT_TIMEOUT -__version__ = '0.10.6' +__version__ = '0.10.7' LOG = logging.getLogger(__name__) _ = XLATOR.gettext @@ -745,11 +745,12 @@ class BaseLdapApplication(BaseDPXApplication): # ------------------------------------------------------------------------- def disconnect_all(self): - if len(self.ldap_connection) or len(self.ldap_server): - LOG.debug(_("Disconnecting from all remaining LDAP instances ...")) + if hasattr(self, 'ldap_connection'): + if len(self.ldap_connection) or len(self.ldap_server): + LOG.debug(_("Disconnecting from all remaining LDAP instances ...")) - for inst in self.ldap_instances: - self.disconnect_instance(inst) + for inst in self.ldap_instances: + self.disconnect_instance(inst) # ------------------------------------------------------------------------- def disconnect_instance(self, inst): diff --git a/lib/pp_admintools/handler/ldap_password.py b/lib/pp_admintools/handler/ldap_password.py index 0c5dbfd..65132b2 100644 --- a/lib/pp_admintools/handler/ldap_password.py +++ b/lib/pp_admintools/handler/ldap_password.py @@ -31,7 +31,7 @@ LOG = logging.getLogger(__name__) _ = XLATOR.gettext ngettext = XLATOR.ngettext -__version__ = '0.2.0' +__version__ = '0.2.1' # ============================================================================= @@ -136,7 +136,7 @@ class LdapPasswordHandler(HandlingObject): for schema in cls.default_rounds: key = schema + '__rounds' - context_opts[key] = cls.default_rounds[key] + context_opts[key] = cls.default_rounds[schema] cls.passlib_context = passlib.context.CryptContext(**context_opts)