fix python execution

This commit is contained in:
Saifeddine ALOUI 2024-09-29 12:16:48 +02:00
parent c395b14209
commit 2a90e69ff9

View File

@ -70,7 +70,10 @@ def execute_python(code, client, message_id, build_file=True):
return error_json
# The child process was successful.
output_json = {"output": output.decode("utf8"), "execution_time": execution_time}
if output:
output_json = {"output": output.decode("utf8"), "execution_time": execution_time}
else:
output_json = {"output": "", "execution_time": execution_time}
return output_json
return spawn_process(code)