mirror of
https://github.com/ParisNeo/lollms-webui.git
synced 2024-12-18 20:17:50 +00:00
fix python execution
This commit is contained in:
parent
c395b14209
commit
2a90e69ff9
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user