Commit 4d687d6f authored by Thomas Vincent's avatar Thomas Vincent

more attribute/variable duplicate removal

parent 72051bee
......@@ -265,7 +265,7 @@ class KmapMerger(object):
self.__term_evt.set()
results = {}
self.__proc_indices = proc_indices = {}
self.__proc_indices = {}
for proc_idx, (scan_id, infos) in enumerate(scans.items()):
args = (scan_id,
proc_idx,
......@@ -281,11 +281,10 @@ class KmapMerger(object):
results[scan_id] = pool.apply_async(_add_edf_data,
args,
callback=callback)
proc_indices[scan_id] = proc_idx
self.__proc_indices[scan_id] = proc_idx
pool.close()
self.__proc_indices = proc_indices
pool.join()
proc_results = [result.get() for result in results.values()]
......@@ -650,11 +649,10 @@ class KmapMerger(object):
# TODO : rework
if self.__shared_progress is not None:
progress = np.frombuffer(self.__shared_progress, dtype='int32')
proc_indices = self.__proc_indices
if proc_indices:
if self.__proc_indices:
merge_progress = dict([(scan_id, progress[proc_idx])
for scan_id, proc_idx in
proc_indices.items()])
self.__proc_indices.items()])
else:
merge_progress = dict([(scan_id, 0)
for scan_id in self.selected_ids])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment