Commit 7f7c9c2c authored by Klaus Aehlig's avatar Klaus Aehlig
Browse files

Don't lose stdout/stderr in AssertCommand

If a command fails/succeeds that should not do so,
show stdout and stderr. This information can be
relevant for debugging.
Signed-off-by: default avatarKlaus Aehlig <>
Reviewed-by: default avatarPetr Pudlak <>
parent bbd3ac36
......@@ -189,7 +189,11 @@ def AssertCommand(cmd, fail=False, node=None, log_cmd=True, max_seconds=None):
rcode = popen.returncode
duration_seconds = TimedeltaToTotalSeconds( - start)
if fail is not None:
_AssertRetCode(rcode, fail, cmdstr, nodename)
print "Stdout was:\n%s\nStderr was:\n%s\n" % (stdout, stderr)
if max_seconds is not None:
if duration_seconds > max_seconds:
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment