close fp after unlock
@@ -31,6 +31,7 @@ class Lock(object):
if cmd == self.lock.LOCK_UN:
Lock._owner = None
self.lock.flock(fp, cmd)
+ fp.close()
elif cmd == self.lock.LOCK_EX:
if Lock._owner is None:
Lock._owner = os.getpid()
