mirror of
https://github.com/ParisNeo/lollms-webui.git
synced 2025-06-15 05:48:07 +00:00
Update shell_execution_engine.py
This commit is contained in:
@ -50,11 +50,11 @@ def execute_bash(code, client:Client):
|
||||
# Check if the process was successful.
|
||||
if process.returncode != 0:
|
||||
# The child process threw an exception.
|
||||
error_message = f"Error executing Python code: {error.decode('utf8')}"
|
||||
error_message = f"Error executing Python code: {error.decode('utf8','ignore')}"
|
||||
error_json = {"output": "<div class='text-red-500'>"+error_message+"</div>", "execution_time": execution_time}
|
||||
return error_json
|
||||
|
||||
# The child process was successful.
|
||||
output_json = {"output": output.decode("utf8"), "execution_time": execution_time}
|
||||
return output_json
|
||||
return spawn_process(code)
|
||||
return spawn_process(code)
|
||||
|
Reference in New Issue
Block a user