Skip to content

Commit 6f45475

Browse files
committed
Include command output on error
Signed-off-by: Ivan Kanakarakis <ivan.kanak@gmail.com>
1 parent 1a8fd41 commit 6f45475

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/xmlsec/test/__init__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,7 @@ def run_cmd(args, softhsm_conf=None):
3030
logging.debug(out)
3131
rv = proc.wait()
3232
if rv:
33-
raise RuntimeError("command exited with code != 0: %d" % rv)
33+
msg = '[exit-code: {code}] [stdout: {out}] [stderr: {err}]'.format(
34+
code=rv, out=out.strip(), err=err.strip(),
35+
)
36+
raise RuntimeError(msg)

0 commit comments

Comments
 (0)