This commit is contained in:
xyj 2023-12-29 10:08:55 +08:00
parent 86a4fa3265
commit d80b24bab6
2 changed files with 0 additions and 2 deletions

View File

@ -1,5 +1,4 @@
import json
import time
import uvicorn
from fastapi import FastAPI

View File

@ -60,7 +60,6 @@ def exec_sh(msg, client):
client.publish(info_topic, payload=publish_payload(code=200, msg='reloading'), qos=0)
subprocess.Popen([cmd], shell=True)
return
# subprocess.Popen([cmd], shell=True)
p = subprocess.Popen([cmd], shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
out, err = p.communicate()
output = out.decode('utf-8').strip()