# 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
# -------------------------------------------------------------------------
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):
_ = XLATOR.gettext
ngettext = XLATOR.ngettext
-__version__ = '0.2.0'
+__version__ = '0.2.1'
# =============================================================================
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)