mirror of
https://github.com/Websoft9/websoft9.git
synced 2025-02-03 01:28:39 +08:00
Update shell_execute.py
This commit is contained in:
parent
7217e22a72
commit
f2f00f8110
@ -46,3 +46,8 @@ def execute_CommandReturn(cmd_str, timeout=30, timeinner=3):
|
|||||||
print('\n此次任务执行失败,请根据下面错误原因排查:')
|
print('\n此次任务执行失败,请根据下面错误原因排查:')
|
||||||
print(out_str)
|
print(out_str)
|
||||||
|
|
||||||
|
def execute_command_output(cmd_str):
|
||||||
|
print(cmd_str)
|
||||||
|
out_str = subprocess.getoutput (cmd_str)
|
||||||
|
print(out_str)
|
||||||
|
return out_str
|
||||||
|
Loading…
Reference in New Issue
Block a user