We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f9a00a8 commit a41e686Copy full SHA for a41e686
filelock.py
@@ -391,15 +391,14 @@ def _acquire(self):
391
return None
392
393
def _release(self):
394
+ # Do not remove the lockfile:
395
+ #
396
+ # https://github.com/benediktschmitt/py-filelock/issues/31
397
+ # https://stackoverflow.com/questions/17708885/flock-removing-locked-file-without-race-condition
398
fd = self._lock_file_fd
399
self._lock_file_fd = None
400
fcntl.flock(fd, fcntl.LOCK_UN)
401
os.close(fd)
-
- try:
- os.remove(self._lock_file)
- except OSError:
402
- pass
403
404
405
# Soft lock
0 commit comments