etcd3: use discard() rather than remove()
Change-Id: Icdf2ecc7e3500ef6c2efdc1f61d2431b13831141
This commit is contained in:
parent
ae1e42274b
commit
24101cf264
|
@ -116,10 +116,7 @@ class Etcd3Lock(locking.Lock):
|
|||
# FIXME(jd) when pyetcd3 returns the status
|
||||
# https://github.com/kragniz/python-etcd3/pull/126
|
||||
self._coord.client.delete(self._key)
|
||||
try:
|
||||
self._coord._acquired_locks.remove(self)
|
||||
except KeyError:
|
||||
pass
|
||||
self._coord._acquired_locks.discard(self)
|
||||
return True
|
||||
|
||||
@_translate_failures
|
||||
|
|
Loading…
Reference in New Issue