Skip to content

Commit

Permalink
Update app.py
Browse files Browse the repository at this point in the history
  • Loading branch information
thebaptiste authored Mar 5, 2021
1 parent 1e8a578 commit 5aa3c5e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ def ssh_process(ssh, input_ssh):
stdin, stdout, stderr = ssh.exec_command(command_str)

ssh_exit_status = stdout.channel.recv_exit_status()
print(f"ssh exit status: {ssh_exit_status}")

out = "".join(stdout.readlines())
out = out.strip() if out is not None else None
Expand All @@ -108,8 +107,7 @@ def ssh_process(ssh, input_ssh):
err = err.strip() if err is not None else None
if err:
print(f"Error: \n{err}")
if out is None:
sys.exit(1)

if ssh_exit_status != 0:
print(f"ssh exit status: {ssh_exit_status}")
sys.exit(1)
Expand Down

0 comments on commit 5aa3c5e

Please sign in to comment.