further cleanup in regards the commands that are being used within core

This commit is contained in:
Blake J. Harnden 2018-03-01 16:23:58 -08:00
parent 870d87804b
commit 6211b09585
15 changed files with 322 additions and 316 deletions

View file

@ -429,11 +429,11 @@ class Session(object):
# execute hook file
try:
subprocess.check_call(["/bin/sh", file_name], stdin=open(os.devnull, 'r'),
stdout=stdout, stderr=stderr, close_fds=True,
cwd=self.session_dir, env=self.get_environment())
except subprocess.CalledProcessError:
logger.exception("error running hook '%s'", file_name)
args = ["/bin/sh", file_name]
subprocess.check_call(args, stdout=stdout, stderr=stderr,
close_fds=True, cwd=self.session_dir, env=self.get_environment())
except (OSError, subprocess.CalledProcessError):
logger.exception("error running hook: %s", file_name)
def run_state_hooks(self, state):
"""