From a4c68afbaa1d4163c6fe248276d824bd9a1d1d15 Mon Sep 17 00:00:00 2001 From: Benjamin Dauvergne Date: Tue, 19 May 2015 22:13:19 +0200 Subject: [PATCH] metasync: move initialization of actions out of the main loop --- lib/metasync | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/metasync b/lib/metasync index ca095c1..ee48497 100755 --- a/lib/metasync +++ b/lib/metasync @@ -282,6 +282,7 @@ batched = 0 batch = [] seen_dns = set() renames, creates, updates, deletes = 0, 0, 0, 0 +actions = [] for results in batch_generator(rconn.paged_search_ext_s( args.ldap_basedn, ldap.SCOPE_SUBTREE, @@ -297,7 +298,6 @@ for results in batch_generator(rconn.paged_search_ext_s( filters.append(filter_format( filter_tpl, (objc, value))) found_dns = get_found_dns(filters) - actions = [] for k, (dn, entry) in new_dns.iteritems(): target_dn = new_dn(dn) seen_dns.add(target_dn)