Commit 528fa2bb by Waheed Ahmed

Merge pull request #30 from edx/waheed/improve-jail-code-error-msg-with-status-code

Improved error message with status code on unsuccessful subprocess.
parents 9d9e4030 eefdb98c
......@@ -152,7 +152,9 @@ def safe_exec(code, globals_dict, files=None, python_path=None, slug=None,
)
if res.status != 0:
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))
......
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