Commit eefdb98c by Waheed Ahmed

Improved error message on unsuccessfull subprocess with status code.

parent 9d9e4030
...@@ -152,7 +152,9 @@ def safe_exec(code, globals_dict, files=None, python_path=None, slug=None, ...@@ -152,7 +152,9 @@ def safe_exec(code, globals_dict, files=None, python_path=None, slug=None,
) )
if res.status != 0: if res.status != 0:
raise SafeExecException( raise SafeExecException(
"Couldn't execute jailed code: %s" % res.stderr "Couldn't execute jailed code: {error} with status code: {status}".format(
error=res.stderr, status=res.status
)
) )
globals_dict.update(json.loads(res.stdout)) globals_dict.update(json.loads(res.stdout))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment