Allow shutdown of qpidd to fail (since it may be missing).

Fixes #81
This commit is contained in:
Ed Hall 2012-03-13 12:26:00 -07:00
parent cfdd62b8f6
commit 845528a847
3 changed files with 6 additions and 2 deletions

View File

@ -21,6 +21,7 @@
{
# Qpidd runs on the same port
"run_as_root": true,
"ignore_failure": true,
"cmd": [
"service",
"qpidd",
@ -30,6 +31,7 @@
{
# Qpidd runs on the same port
"run_as_root": true,
"ignore_failure": true,
"cmd": [
"chkconfig",
"qpidd",

View File

@ -81,7 +81,7 @@ def execute(*cmd, **kwargs):
cwd = kwargs.pop('cwd', None)
env_overrides = kwargs.pop('env_overrides', None)
close_stdin = kwargs.pop('close_stdin', False)
ignore_exit_code = False
ignore_exit_code = kwargs.pop('ignore_exit_code', False)
if isinstance(check_exit_code, bool):
ignore_exit_code = not check_exit_code

View File

@ -90,7 +90,9 @@ def execute_template(*cmds, **kargs):
stdin = joinlinesep(*stdin_full)
exec_result = sh.execute(*cmd_to_run,
run_as_root=cmdinfo.get('run_as_root', False),
process_input=stdin, **kargs)
process_input=stdin,
ignore_exit_code=cmdinfo.get('ignore_failure', False),
**kargs)
cmd_results.append(exec_result)
return cmd_results