浏览代码

Create shell_execute.py

qiaofeng1227 2 年之前
父节点
当前提交
b4ff55352a
共有 1 个文件被更改,包括 1 次插入2 次删除
  1. 1 2
      appmanage/api/utils/shell_execute.py

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

@@ -55,8 +55,7 @@ def execute_command_output(cmd_str):
 # cmd_str: 执行的command命令 times:如果不成功的重复次数
 # cmd_str: 执行的command命令 times:如果不成功的重复次数
 def execute_command_output_all(cmd_str, max_time = 3):
 def execute_command_output_all(cmd_str, max_time = 3):
     
     
-    print(cmd_str)
-    
+    print("start to excute cmd: " + cmd_str)
     excutetime = 0
     excutetime = 0
     while excutetime < max_time:
     while excutetime < max_time:
         process = subprocess.run(cmd_str, shell=True, stdout=subprocess.PIPE, universal_newlines=True)
         process = subprocess.run(cmd_str, shell=True, stdout=subprocess.PIPE, universal_newlines=True)