summaryrefslogtreecommitdiff
path: root/kazoo/recipe/lock.py
diff options
context:
space:
mode:
authorCharles-Henri de Boysson <ceache@users.noreply.github.com>2021-12-02 16:35:38 +0100
committerGitHub <noreply@github.com>2021-12-02 16:35:38 +0100
commitf585d605eea0a37a08aae95a8cc259b80da2ecf0 (patch)
tree623a73d6ad6d5a7b2d476799b005e322a4f7bc30 /kazoo/recipe/lock.py
parent1ea097d5d50466705ca1ec12945ce290c256915c (diff)
parent569c89cda811593f99294c055d00ebf27aab3068 (diff)
downloadkazoo-f585d605eea0a37a08aae95a8cc259b80da2ecf0.tar.gz
Merge pull request #657 from syseleven/sneubauer/fix-deprecation-warning
fix(recipe): fix deprecation warning from threading.Event
Diffstat (limited to 'kazoo/recipe/lock.py')
-rw-r--r--kazoo/recipe/lock.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/kazoo/recipe/lock.py b/kazoo/recipe/lock.py
index 7722a97..8bcc236 100644
--- a/kazoo/recipe/lock.py
+++ b/kazoo/recipe/lock.py
@@ -276,7 +276,7 @@ class Lock(object):
pass # predecessor has already been deleted
else:
self.wake_event.wait(timeout)
- if not self.wake_event.isSet():
+ if not self.wake_event.is_set():
raise LockTimeout(
"Failed to acquire lock on %s after %s seconds"
% (self.path, timeout)
@@ -638,7 +638,7 @@ class Semaphore(object):
# If blocking, wait until self._watch_lease_change() is
# called before returning
self.wake_event.wait(w.leftover())
- if not self.wake_event.isSet():
+ if not self.wake_event.is_set():
raise LockTimeout(
"Failed to acquire semaphore on %s"
" after %s seconds" % (self.path, timeout)