]> Frank Brehm's Git Trees - pixelpark/ldap-migration.git/commitdiff
Minor changes
authorFrank Brehm <frank.brehm@pixelpark.com>
Fri, 4 Dec 2020 16:10:43 +0000 (17:10 +0100)
committerFrank Brehm <frank.brehm@pixelpark.com>
Fri, 4 Dec 2020 16:10:43 +0000 (17:10 +0100)
lib/ldap_migration/__init__.py

index 756d03094ab097156fac1c54101ec4962c13f07c..952ab5e1bcf36e0049469ebc5792d11539735483 100644 (file)
@@ -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()