From 1c141c3edaed8afbd97e325f4ac4dadca574128b Mon Sep 17 00:00:00 2001 From: Nguyen Huu Thuong Date: Sat, 13 Jun 2020 09:22:41 +0200 Subject: [PATCH] print err, out --- app.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app.py b/app.py index cb089ec..31313d6 100644 --- a/app.py +++ b/app.py @@ -82,9 +82,13 @@ def ssh_process(ssh, input_ssh): err = "".join(stderr.readlines()) err = err.strip() if err is not None else None if err: - raise Exception(f"SSH failed:\n{err}") + print(f"Error: \n{err}") + + out = "".join(stdout.readlines()) + out = out.strip() if out is not None else None + if out: + print(f"Success: \n{out}") - print("".join(stdout.readlines())) pass