diff options
author | prashantsinalkar | 2019-10-02 20:07:26 +0530 |
---|---|---|
committer | prashantsinalkar | 2019-10-02 20:07:26 +0530 |
commit | 070cb90095df4ab5bc7b6e28fd13bb12df29e1f7 (patch) | |
tree | c4dc5473eb19d735a8209138d6b5a389a161d511 /instances.py | |
parent | 3e27e89873a65071f1f9cfcf0bef3e3b9a68f09c (diff) | |
download | R_on_Cloud_Web_Interface-070cb90095df4ab5bc7b6e28fd13bb12df29e1f7.tar.gz R_on_Cloud_Web_Interface-070cb90095df4ab5bc7b6e28fd13bb12df29e1f7.tar.bz2 R_on_Cloud_Web_Interface-070cb90095df4ab5bc7b6e28fd13bb12df29e1f7.zip |
updated the code and fixed the bugs
Diffstat (limited to 'instances.py')
-rw-r--r-- | instances.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/instances.py b/instances.py index db3167b..f7f0774 100644 --- a/instances.py +++ b/instances.py @@ -50,8 +50,8 @@ def execute_code(code, user_id, R_file_id): os.makedirs(TEMP_DIR) result = requests.post(API_URL, json=jsondata, headers=headers) output = result.json() - output_auth_error = json.loads(json.dumps(output['auth_error'])) - if output_auth_error != '400': + output_status = json.loads(json.dumps(output['status'])) + if output_status != '400': output_data = json.loads(json.dumps(output['data'])) output_error = json.loads(json.dumps(output['error'])) plot_exist = json.loads(json.dumps(output['is_plot'])) @@ -64,7 +64,9 @@ def execute_code(code, user_id, R_file_id): 'plot_path': plot_path_req, } else: - data = {'error': "Invalid request, please try after some time"} + data = {'error': "Invalid request, please try after some time {0}" + .format(output_status) + } return data |