瀏覽代碼

Update shell_execute.py

qiaofeng1227 2 年之前
父節點
當前提交
649ee3df5e
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      appmanage/api/utils/shell_execute.py

+ 1 - 1
appmanage/api/utils/shell_execute.py

@@ -58,7 +58,7 @@ def execute_command_output_all(cmd_str, max_time = 3):
     print("start to excute cmd: " + cmd_str)
     excutetime = 0
     while excutetime < max_time:
-        process = subprocess.run(cmd_str, shell=True, stdout=subprocess.PIPE, universal_newlines=True)
+        process = subprocess.run(convert_command(cmd_str), shell=True, stdout=subprocess.PIPE, universal_newlines=True)
         if process.returncode == 0:
             return {"code": "0", "result": process.stdout,}
         else: