metasync: move initialization of actions out of the main loop
This commit is contained in:
parent
9b7d4b2ced
commit
a4c68afbaa
|
@ -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)
|
||||
|
|
Reference in New Issue