Compare commits
4 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
c9b539abea | |
|
|
5aa3c5e8d1 | |
|
|
1e8a5783bc | |
|
|
fed5e4953c |
5
app.py
5
app.py
|
|
@ -96,6 +96,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:
|
||||
|
|
@ -105,6 +107,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
|
||||
|
|
|
|||
Loading…
Reference in New Issue