Avoid a new deprecation warning from filelock dependency (#2237)
Co-authored-by: Bernát Gábor <gaborjbernat@gmail.com>
This commit is contained in:
parent
bf5691502d
commit
1f1fdc9a0a
2 changed files with 3 additions and 2 deletions
1
docs/changelog/2237.feature.rst
Normal file
1
docs/changelog/2237.feature.rst
Normal file
|
|
@ -0,0 +1 @@
|
|||
Avoid deprecation warning from py-filelock argument - by :user:`ofek`.
|
||||
|
|
@ -25,10 +25,10 @@ class _CountedFileLock(FileLock):
|
|||
self.count = 0
|
||||
self.thread_safe = RLock()
|
||||
|
||||
def acquire(self, timeout=None, poll_intervall=0.05):
|
||||
def acquire(self, timeout=None, poll_interval=0.05):
|
||||
with self.thread_safe:
|
||||
if self.count == 0:
|
||||
super(_CountedFileLock, self).acquire(timeout=timeout, poll_intervall=poll_intervall)
|
||||
super(_CountedFileLock, self).acquire(timeout, poll_interval)
|
||||
self.count += 1
|
||||
|
||||
def release(self, force=False):
|
||||
|
|
|
|||
Loading…
Reference in a new issue