From 35ada7245da3fe3b1183e1199933fb1fbddff936 Mon Sep 17 00:00:00 2001 From: Jan Tluka Date: Tue, 28 May 2024 15:39:21 +0200 Subject: [PATCH] Tests/Ping: save stdout/stderr to _res_data Signed-off-by: Jan Tluka --- lnst/Tests/Ping.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lnst/Tests/Ping.py b/lnst/Tests/Ping.py index d5cf6aab..434fb8e3 100644 --- a/lnst/Tests/Ping.py +++ b/lnst/Tests/Ping.py @@ -52,11 +52,13 @@ def run(self): except KeyboardInterrupt: pass + self._res_data["stdout"] = stdout + self._res_data["stderr"] = stderr + if ping_process.returncode > 1: self._res_data["msg"] = "returncode = {}".format(ping_process.returncode) logging.error(self._res_data["msg"]) if stderr != "": - self._res_data["stderr"] = stderr logging.error("errors reported by ping") logging.error(self._res_data["stderr"]) return False