diff options
author | Lars Wirzenius <liw@liw.fi> | 2015-05-09 19:22:28 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2015-05-09 19:22:28 +0300 |
commit | 60ab3755923ac5c489e7e89f75b54868501659a3 (patch) | |
tree | 88793831c88e3a9f966b983d926615221f5bf9df | |
parent | 3deac911efa329e47cef5805be4a69f7f7cf549b (diff) | |
download | cliapp-60ab3755923ac5c489e7e89f75b54868501659a3.tar.gz |
Include stdout output in exception if command fails
-rw-r--r-- | cliapp/runcmd.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cliapp/runcmd.py b/cliapp/runcmd.py index b06431e..717a5f5 100644 --- a/cliapp/runcmd.py +++ b/cliapp/runcmd.py @@ -53,7 +53,7 @@ def runcmd(argv, *args, **kwargs): exit_code, out, err = runcmd_unchecked(argv, *args, **kwargs) if exit_code != 0: - msg = 'Command failed: %s\n%s' % (' '.join(argv), err) + msg = 'Command failed: %s\n%s\n%s' % (' '.join(argv), out, err) if opts['ignore_fail']: if opts['log_error']: logging.info(msg) |