Browse Source

Update shell_execute.py

qiaofeng1227 2 years ago
parent
commit
21380948d8
1 changed files with 2 additions and 2 deletions
  1. 2 2
      appmanage/api/utils/shell_execute.py

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

@@ -18,10 +18,10 @@ def execute_command_output_all(cmd_str):
     process = subprocess.run(f'nsenter -m -u -i -n -p -t 1 sh -c "{cmd_str}"', capture_output=True, check=False, text=True, shell=True)
         
     if process.returncode == 0 and 'Fail' not in process.stdout and 'fail' not in process.stdout and 'Error' not in process.stdout and 'error' not in process.stdout:
-       myLogger.info_logger("success to excute cmd ")
+       myLogger.info_logger("success to execute cmd ")
        return {"code": "0", "result": process.stdout,}
     else:
-       myLogger.info_logger("failed to excute cmd ")
+       myLogger.info_logger("failed to execute cmd ")
        raise CommandException(const.ERROR_SERVER_COMMAND,"Docker returns the original error",process.stdout)
 
 def convert_command(cmd_str):