This change corrects Pidfile.unlock[1] implementation, indeed currently
it uses fcntl.flock response as a condition but fcntl.flock is a "void"
function.
[1] neutron.agent.linux.daemon
Closes-Bug: #
1472725
Change-Id: If2320f29095ed388f9f6fe59d4d9b80d04adaa85
return self.pidfile
def unlock(self):
- if not not fcntl.flock(self.fd, fcntl.LOCK_UN):
- raise IOError(_('Unable to unlock pid file'))
+ fcntl.flock(self.fd, fcntl.LOCK_UN)
def write(self, pid):
os.ftruncate(self.fd, 0)