[fix] _run_service_command was not properly returning False if command failed (#616)

This commit is contained in:
Alexandre Aubin 2019-01-17 16:12:49 +01:00 committed by GitHub
parent 808d844f84
commit bfe5056720
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -663,7 +663,7 @@ def _run_service_command(action, service):
try: try:
# Launch the command # Launch the command
logger.debug("Running '%s'" % cmd) logger.debug("Running '%s'" % cmd)
p = subprocess.Popen(cmd.split(), stderr=subprocess.STDOUT) p = subprocess.check_call(cmd.split(), stderr=subprocess.STDOUT)
# If this command needs a lock (because the service uses yunohost # If this command needs a lock (because the service uses yunohost
# commands inside), find the PID and add a lock for it # commands inside), find the PID and add a lock for it
if need_lock: if need_lock: