]> Frank Brehm's Git Trees - pixelpark/pp-admin-tools.git/commitdiff
Bugfixing
authorFrank Brehm <frank@brehm-online.com>
Fri, 11 Nov 2022 08:51:23 +0000 (09:51 +0100)
committerFrank Brehm <frank@brehm-online.com>
Fri, 11 Nov 2022 08:51:23 +0000 (09:51 +0100)
lib/pp_admintools/app/ldap.py
lib/pp_admintools/handler/ldap_password.py

index aec35628a65cc8733bc77b9fc7dbdcb08fec971c..11bde024fac9a110c8f8c6ae0bdffa47abe18ff1 100644 (file)
@@ -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):
index 0c5dbfd0a37098fb2ead574fa4fdde765e919293..65132b21289c416065e30521b4822585fe34561a 100644 (file)
@@ -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)