From 359ef60bc25a292f2cc10345b8c9192c415df7a7 Mon Sep 17 00:00:00 2001 From: Chris Hines <chris.hines@monash.edu> Date: Tue, 12 May 2020 15:17:33 +1000 Subject: [PATCH] pass more slurm messages back to the web interface --- TES/tes/apiendpoints.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/TES/tes/apiendpoints.py b/TES/tes/apiendpoints.py index a4a7959..63aca00 100644 --- a/TES/tes/apiendpoints.py +++ b/TES/tes/apiendpoints.py @@ -391,7 +391,9 @@ class JobSubmit(Resource): except SshCtrlException as e: #return json.dumps({'message':"We're having difficultly contacting {}. We failed with the message {}".format(params['identity']['site']['host'],e)}), 400 #flask_restful.abort(400,message="We're having difficultly contacting {}. We failed with the message {}".format(params['identity']['site']['host'],e)) - return apiabort(400,message="We're having difficultly contacting {}. We failed with the message {}".format(params['identity']['site']['host'],e)) + return apiabort(400, message="We're having difficultly contacting {}. We failed with the message {}".format(params['identity']['site']['host'],e)) + except SshExecException as e: + return apiabort(400, message="{}".format(e)) if not (res['stderr'] == '' or res['stderr'] is None or res['stderr'] == b''): #return json.dumps({'message':res['stderr'].decode()}), 400 #flask_restful.abort(400, message=res['stderr'].decode()) -- GitLab