Merge branch 'master' into latest

# Please enter a commit message to explain why this merge is necessary,
latest v1.1.4
Nguyen Huu Thuong 2021-03-05 12:33:13 +01:00
commit 28805c68f3
1 changed files with 5 additions and 0 deletions

5
app.py
View File

@ -98,6 +98,8 @@ def ssh_process(ssh, input_ssh):
stdin, stdout, stderr = ssh.exec_command(command_str)
ssh_exit_status = stdout.channel.recv_exit_status()
out = "".join(stdout.readlines())
out = out.strip() if out is not None else None
if out:
@ -107,6 +109,9 @@ def ssh_process(ssh, input_ssh):
err = err.strip() if err is not None else None
if err:
print(f"Error: \n{err}")
if ssh_exit_status != 0:
print(f"ssh exit status: {ssh_exit_status}")
sys.exit(1)
pass