From bfe505672072a0bcf00401c05e87c235b64f3bb5 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Thu, 17 Jan 2019 16:12:49 +0100 Subject: [PATCH] [fix] _run_service_command was not properly returning False if command failed (#616) --- src/yunohost/service.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/yunohost/service.py b/src/yunohost/service.py index d9bd39fba..973c89362 100644 --- a/src/yunohost/service.py +++ b/src/yunohost/service.py @@ -663,7 +663,7 @@ def _run_service_command(action, service): try: # Launch the command 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 # commands inside), find the PID and add a lock for it if need_lock: