Commit cf0ec9cb authored by Klaus Aehlig's avatar Klaus Aehlig Committed by Hrvoje Ribicic
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 <>

Cherry-picked-from: 7f7c9c2c

Signed-off-by: default avatarHrvoje Ribicic <>
Reviewed-by: default avatarKlaus Aehlig <>
parent 29e110a2
......@@ -187,7 +187,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)
_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