Skip to content
Snippets Groups Projects
Commit a6726f05 authored by Philipp Schmidt's avatar Philipp Schmidt
Browse files

(fixup) Fix update_config test

parent a2139cc4
No related branches found
No related tags found
1 merge request!801Fix update_config to work with non-AGIPD and add REMI
......@@ -70,6 +70,7 @@ def test_main(capsys):
"--rel-gain", "true",
"--webservice-address", "inproc://socket",
"--correct",
"--verbose"
],
):
with patch("zmq.Context", return_value=context):
......
......@@ -95,6 +95,9 @@ action_group.add_argument(
action_group.add_argument(
'--dark', '-d', action='store_true')
parser.add_argument(
'--verbose', '-v', action='store_true',
help='More verbose output, i.a. print the entire configuration written.')
parser.add_argument(
'--apply', action='store_true',
help='Apply and push the requested configuration update to the git.')
......@@ -276,13 +279,15 @@ def main():
resp = socket.recv_multipart()[0]
print("# Configuration now in place is:")
total_config = yaml.safe_load(resp.decode())
print(yaml.dump({
action: {instrument: {
karabo_id: total_config[action][instrument][karabo_id]
}}
}, default_flow_style=False))
if args['verbose']:
print(resp.decode())
else:
total_config = yaml.safe_load(resp.decode())
print(yaml.dump({
action: {instrument: {
karabo_id: total_config[action][instrument][karabo_id]
}}
}, default_flow_style=False))
if __name__ == '__main__':
......
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