From f8cbae79e111e52d1b5ced8334eacb2474ccfa84 Mon Sep 17 00:00:00 2001 From: Julien Legros Date: Wed, 21 Mar 2018 13:02:15 +0100 Subject: [PATCH] [FIX] runbot: nginx reload Actually check the return code and do not raise any exception doing so. --- runbot/models/repo.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/runbot/models/repo.py b/runbot/models/repo.py index 194a55b5..7b45a7e0 100644 --- a/runbot/models/repo.py +++ b/runbot/models/repo.py @@ -294,9 +294,9 @@ class runbot_repo(models.Model): os.kill(pid, signal.SIGHUP) except Exception: _logger.debug('start nginx') - if subprocess.check_output(['/usr/sbin/nginx', '-p', nginx_dir, '-c', 'nginx.conf']): + if subprocess.call(['/usr/sbin/nginx', '-p', nginx_dir, '-c', 'nginx.conf']): # obscure nginx bug leaving orphan worker listening on nginx port - if not subprocess.check_output(['pkill', '-f', '-P1', 'nginx: worker']): + if not subprocess.call(['pkill', '-f', '-P1', 'nginx: worker']): _logger.debug('failed to start nginx - orphan worker killed, retrying') subprocess.call(['/usr/sbin/nginx', '-p', nginx_dir, '-c', 'nginx.conf']) else: