From ad5431d274a32cb8421146ccdb48af0f0631fa58 Mon Sep 17 00:00:00 2001 From: Paul Belanger Date: Tue, 9 Jan 2018 12:24:08 -0500 Subject: [PATCH] Fix error handling for pidfile Zuul will now try to open the pidfile and raise an exception if there is a permission / issue with the pidfile path. Change-Id: I3276ffe2de0eeb99a4eb11ba7c0e12a62f1d9886 Signed-off-by: Paul Belanger --- zuul/cmd/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/zuul/cmd/__init__.py b/zuul/cmd/__init__.py index 236fd9f449..07d4a8d084 100755 --- a/zuul/cmd/__init__.py +++ b/zuul/cmd/__init__.py @@ -181,8 +181,9 @@ class ZuulDaemonApp(ZuulApp): else: # Exercise the pidfile before we do anything else (including # logging or daemonizing) - with daemon.DaemonContext(pidfile=pid): + with pid: pass + with daemon.DaemonContext(pidfile=pid): self.run()