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

avoid saving no-arg

parent 329d50cc
No related branches found
No related tags found
1 merge request!181Feat/boolarg convert to false
...@@ -71,6 +71,8 @@ for key, value in args.items(): ...@@ -71,6 +71,8 @@ for key, value in args.items():
if key in available_options[detector] and value is not None: if key in available_options[detector] and value is not None:
if 'no-' in key and isinstance(value, bool): if 'no-' in key and isinstance(value, bool):
new_conf[task][instrument][detector][key.replace('no-','')] = False new_conf[task][instrument][detector][key.replace('no-','')] = False
# avoid saving the "no-"key into the updated config
continue
new_conf[task][instrument][detector][key] = value new_conf[task][instrument][detector][key] = value
pyaml = yaml.dump(new_conf, default_flow_style=False) pyaml = yaml.dump(new_conf, default_flow_style=False)
......
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