From: Frank Brehm Date: Thu, 19 Nov 2020 11:53:05 +0000 (+0100) Subject: Bugfixing X-Git-Url: https://git.uhu-banane.net/?a=commitdiff_plain;h=d53525b944c6d65f0a07e57e6dc92d9ae46c37f1;p=pixelpark%2Fldap-migration.git Bugfixing --- diff --git a/lib/ldap_migration/__init__.py b/lib/ldap_migration/__init__.py index 79e6575..85f8f29 100644 --- a/lib/ldap_migration/__init__.py +++ b/lib/ldap_migration/__init__.py @@ -37,7 +37,7 @@ from fb_tools.errors import FbAppError from .config import LDAPMigrationConfiguration from .idict import CaseInsensitiveDict -__version__ = '0.6.5' +__version__ = '0.6.6' LOG = logging.getLogger(__name__) CFG_BASENAME = 'ldap-migration.ini' @@ -983,8 +983,10 @@ class LDAPMigrationApplication(BaseApplication): src_attrs = ['aci', ALL_ATTRIBUTES] tgt_attrs = [ALL_ATTRIBUTES] + tgt_dn = self.mangle_dn(src_dn) + src_status, src_result, src_response, _ = self.source.search( - search_base=src_dn, search_scope=BASE, search_filter=sfilter, + search_base=tgt_dn, search_scope=BASE, search_filter=sfilter, get_operational_attributes=True, attributes=src_attrs, time_limit=self.config.timeout) @@ -999,7 +1001,6 @@ class LDAPMigrationApplication(BaseApplication): LOG.debug("Response of searching for source DN {dn!r}:\n{res}".format( dn=src_dn, res=pp(src_entry))) - tgt_dn = self.mangle_dn(src_dn) if self.verbose > 1: LOG.debug("Searching for target DN {dn!r}.".format(dn=tgt_dn)) tgt_status, tgt_result, tgt_response, _ = self.target.search( diff --git a/lib/ldap_migration/idict.py b/lib/ldap_migration/idict.py index 37b2ee5..a1a0e75 100644 --- a/lib/ldap_migration/idict.py +++ b/lib/ldap_migration/idict.py @@ -24,7 +24,7 @@ from fb_tools.common import pp from fb_tools.errors import FbError from fb_tools.obj import FbBaseObject -__version__ = '0.1.4' +__version__ = '0.1.5' LOG = logging.getLogger(__name__) @@ -41,7 +41,7 @@ class WrongKeyTypeError(TypeError, FbError): def __str__(self): msg = "Key {key!r} must be of type 'str', but is of type {cls!r} instead." - return msg.format(key=key, cls=key.__class__.__name__) + return msg.format(key=self.key, cls=self.key.__class__.__name__) # =============================================================================