From 7d11bf07f2dd8d91ccdeb3827ec04eb311f4a175 Mon Sep 17 00:00:00 2001 From: Frank Brehm Date: Fri, 4 Dec 2020 17:10:43 +0100 Subject: [PATCH] Minor changes --- lib/ldap_migration/__init__.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/lib/ldap_migration/__init__.py b/lib/ldap_migration/__init__.py index 756d030..952ab5e 100644 --- a/lib/ldap_migration/__init__.py +++ b/lib/ldap_migration/__init__.py @@ -45,7 +45,7 @@ from .config import LDAPMigrationConfiguration from .idict import CaseInsensitiveDict from .istringset import CaseInsensitiveStringSet -__version__ = '0.8.5' +__version__ = '0.8.6' LOG = logging.getLogger(__name__) CFG_BASENAME = 'ldap-migration.ini' @@ -1104,11 +1104,14 @@ class LDAPMigrationApplication(BaseApplication): self.count_unchanged = 0 self.count_added = 0 self.count_modified = 0 + wait = self.config.wait_after_write for src_dn in self.all_entries: try: - self.migrate_entry( - src_dn, fh=fh, force=False, with_acl=False, migrate_if_group=False) + if self.migrate_entry( + src_dn, fh=fh, force=False, with_acl=False, migrate_if_group=False): + if wait: + time.sleep(wait) except WriteLDAPItemError as e: msg = "Abort migration: " + str(e) LOG.error(msg) @@ -1473,10 +1476,10 @@ class LDAPMigrationApplication(BaseApplication): print(self.colored(' * {!r}'.format(key), 'GREEN')) if len(self.src_items_not_found): print() - print(self.colored('Not migrated items:', 'CYAN')) - print(self.colored('###################', 'CYAN')) + print(self.colored('Not migrated items:', 'AQUA')) + print(self.colored('###################', 'AQUA')) for dn in self.src_items_not_found: - print(self.colored(' * {!r}'.format(dn), 'CYAN')) + print(self.colored(' * {!r}'.format(dn), 'AQUA')) finally: self.disconnect() -- 2.39.5