Skip to content
Snippets Groups Projects
Commit ee9e4f5e authored by Steffen Hauf's avatar Steffen Hauf
Browse files

Fail on non-configured instrument

parent 47dd45aa
No related branches found
No related tags found
1 merge request!47Fixes from webservices
...@@ -11,6 +11,7 @@ class Errors: ...@@ -11,6 +11,7 @@ class Errors:
UPLOAD_CONFIG_FAILED = "FAILED: Config for cycle {}, proposal {} could not be uploaded!, please contact det-support@xfel.eu" UPLOAD_CONFIG_FAILED = "FAILED: Config for cycle {}, proposal {} could not be uploaded!, please contact det-support@xfel.eu"
TRANSFER_EVAL_FAILED = "FAILED: Evaluating transfer to offline failed for proposal {}, run {}, please contact det-support@xfel.eu" TRANSFER_EVAL_FAILED = "FAILED: Evaluating transfer to offline failed for proposal {}, run {}, please contact det-support@xfel.eu"
MDC_RESPONSE = "FAILED: Response error from MDC: {}" MDC_RESPONSE = "FAILED: Response error from MDC: {}"
NOT_CONFIGURED = "FAILED: instrument not configured!"
class MDC: class MDC:
......
...@@ -414,7 +414,7 @@ async def server_runner(config, mode): ...@@ -414,7 +414,7 @@ async def server_runner(config, mode):
with open(default_file, "r") as f: with open(default_file, "r") as f:
pconf = yaml.load(f.read())[action] pconf = yaml.load(f.read())[action]
if instrument not in pconf: if instrument not in pconf:
socket.send("FAILED: instrument not configured!".encode()) socket.send(Error.NOT_CONFIGURED.encode())
return return
in_folder = config[action]['in-folder'].format( in_folder = config[action]['in-folder'].format(
......
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