Skip to content

Commit

Permalink
Tests/Ping: save stdout/stderr to _res_data
Browse files Browse the repository at this point in the history
Signed-off-by: Jan Tluka <[email protected]>
  • Loading branch information
jtluka committed May 29, 2024
1 parent 7ea41a2 commit 35ada72
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lnst/Tests/Ping.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 35ada72

Please sign in to comment.