Browse Source

Update shell_execute.py

qiaofeng1227 2 years ago
parent
commit
649ee3df5e
1 changed files with 1 additions and 1 deletions
  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: