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>
This commit is contained in:
Paul Belanger 2018-01-09 12:24:08 -05:00
parent ca2da75ca5
commit ad5431d274
No known key found for this signature in database
GPG Key ID: 611A80832067AF38
1 changed files with 2 additions and 1 deletions

View File

@ -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()