Merge "Correct fcntl.flock use in Pidfile.unlock"
This commit is contained in:
commit
53936c2379
@ -131,8 +131,7 @@ class Pidfile(object):
|
|||||||
return self.pidfile
|
return self.pidfile
|
||||||
|
|
||||||
def unlock(self):
|
def unlock(self):
|
||||||
if not not fcntl.flock(self.fd, fcntl.LOCK_UN):
|
fcntl.flock(self.fd, fcntl.LOCK_UN)
|
||||||
raise IOError(_('Unable to unlock pid file'))
|
|
||||||
|
|
||||||
def write(self, pid):
|
def write(self, pid):
|
||||||
os.ftruncate(self.fd, 0)
|
os.ftruncate(self.fd, 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user