further cleanup in regards the commands that are being used within core
This commit is contained in:
parent
870d87804b
commit
6211b09585
15 changed files with 322 additions and 316 deletions
|
@ -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):
|
||||
"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue