Avoid a new deprecation warning from filelock dependency (#2237)

Co-authored-by: Bernát Gábor <gaborjbernat@gmail.com>
This commit is contained in:
Ofek Lev 2021-12-26 12:23:57 -05:00 committed by GitHub
parent bf5691502d
commit 1f1fdc9a0a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View file

@ -0,0 +1 @@
Avoid deprecation warning from py-filelock argument - by :user:`ofek`.

View file

@ -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):