summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Belanger <pabelanger@redhat.com>2018-01-09 12:24:08 -0500
committerPaul Belanger <pabelanger@redhat.com>2018-01-09 12:38:54 -0500
commitad5431d274a32cb8421146ccdb48af0f0631fa58 (patch)
tree25ad365dfee32e0c730333292a19ac0ae6dffda5
parentca2da75ca5748b1b2b0e6a0b400e0a1e443d917b (diff)
downloadzuul-ad5431d274a32cb8421146ccdb48af0f0631fa58.tar.gz
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 <pabelanger@redhat.com>
-rwxr-xr-xzuul/cmd/__init__.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/zuul/cmd/__init__.py b/zuul/cmd/__init__.py
index 236fd9f44..07d4a8d08 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()