Skip to content
Snippets Groups Projects
Commit f81c720b authored by Karim Ahmed's avatar Karim Ahmed
Browse files

rfix: raise error if wrong key_name

parent 2e6bd597
No related branches found
No related tags found
1 merge request!1094HOTFIXED [AGIPD][Correct]: Fix assumption that all modules follow quadrant convetion under 16 modules
...@@ -127,10 +127,14 @@ def map_modules_from_folder( ...@@ -127,10 +127,14 @@ def map_modules_from_folder(
sequences_qm = {} sequences_qm = {}
for inset in karabo_da: for inset in karabo_da:
module_idx = int(inset[-2:]) module_idx = int(inset[-2:])
if key_name == "qm": if key_name == "qm":
name = module_index_to_qm(module_idx) name = module_index_to_qm(module_idx)
else: elif key_name == "da":
name = inset # karabo_da name = inset # karabo_da
else:
raise ValueError("key_name must be 'da' or 'qm'")
module_files[name] = Queue() module_files[name] = Queue()
sequences_qm[name] = 0 sequences_qm[name] = 0
mod_ids[name] = module_idx mod_ids[name] = module_idx
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment