Merge "Correct fcntl.flock use in Pidfile.unlock"

This commit is contained in:
Jenkins 2015-07-29 17:38:02 +00:00 committed by Gerrit Code Review
commit 53936c2379

View File

@ -131,8 +131,7 @@ class Pidfile(object):
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)