Log exit codes of scripts.

pull/7/head
Ferry Boender 9 years ago
parent 84352bae86
commit b912b24b0f
  1. 2
      src/formconfig.py

@ -140,6 +140,7 @@ class FormConfig(object):
close_fds=True, close_fds=True,
preexec_fn=run_as_fn) preexec_fn=run_as_fn)
stdout, stderr = proc.communicate(input) stdout, stderr = proc.communicate(input)
self.log.info("Exit code: {0}".format(proc.returncode))
return proc.returncode return proc.returncode
except OSError as err: except OSError as err:
self.log.exception(err) self.log.exception(err)
@ -155,6 +156,7 @@ class FormConfig(object):
close_fds=True, close_fds=True,
preexec_fn=run_as_fn) preexec_fn=run_as_fn)
stdout, stderr = proc.communicate() stdout, stderr = proc.communicate()
self.log.info("Exit code: {0}".format(proc.returncode))
return { return {
'stdout': stdout, 'stdout': stdout,
'stderr': stderr, 'stderr': stderr,

Loading…
Cancel
Save