diff options
author | Paul Belanger <pabelanger@redhat.com> | 2018-01-09 12:24:08 -0500 |
---|---|---|
committer | Paul Belanger <pabelanger@redhat.com> | 2018-01-09 12:38:54 -0500 |
commit | ad5431d274a32cb8421146ccdb48af0f0631fa58 (patch) | |
tree | 25ad365dfee32e0c730333292a19ac0ae6dffda5 | |
parent | ca2da75ca5748b1b2b0e6a0b400e0a1e443d917b (diff) | |
download | zuul-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-x | zuul/cmd/__init__.py | 3 |
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() |