Skip to content

Commit

Permalink
Ensure fd is properly cleared on file-lock.
Browse files Browse the repository at this point in the history
Replaces #532
  • Loading branch information
coleifer committed Jun 30, 2020
1 parent 335c5dc commit 3ee834f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions huey/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,9 @@ def acquire(self):

def release(self):
if self.fd is not None:
os.close(self.fd)
fd, self.fd = self.fd, None
os.close(fd)
os.unlink(self.filename)
self.fd = None

def __enter__(self):
self.acquire()
Expand Down

0 comments on commit 3ee834f

Please sign in to comment.