state.Lock: destructor: unlock before closing, not the other way around.
This commit is contained in:
parent
642d60a7c9
commit
340aad1797
1 changed files with 1 additions and 1 deletions
2
state.py
2
state.py
|
|
@ -308,9 +308,9 @@ class Lock:
|
|||
|
||||
def __del__(self):
|
||||
_locks[self.fid] = 0
|
||||
os.close(self.lockfile)
|
||||
if self.owned:
|
||||
self.unlock()
|
||||
os.close(self.lockfile)
|
||||
|
||||
def trylock(self):
|
||||
assert(not self.owned)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue