Skip to content

Commit 9a00bee

Browse files
committed
run_command: Increase debugging output in case of error
- Thanks to @krinsman in #90.
1 parent c320f05 commit 9a00bee

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

batchspawner/batchspawner.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,8 +198,11 @@ def run_command(self, cmd, input=None, env=None):
198198
err = yield proc.wait_for_exit()
199199
except CalledProcessError:
200200
self.log.error("Subprocess returned exitcode %s" % proc.returncode)
201+
self.log.error('Stdout:')
202+
self.log.error(out)
203+
self.log.error('Stderr:')
201204
self.log.error(eout)
202-
raise RuntimeError(eout)
205+
raise RuntimeError('{} exit status {}: {}'.format(cmd, proc.returncode, eout))
203206
if err != 0:
204207
return err # exit error?
205208
else:

0 commit comments

Comments
 (0)