Commit dc6296ff authored by Michael Hanselmann's avatar Michael Hanselmann
Browse files

locking: Simplify condition


Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
parent 52fca4ba
......@@ -1050,8 +1050,8 @@ class LockSet:
self.__owners[threading.currentThread()].remove(name)
# Only remove the key if we don't hold the set-lock as well
if (not self.__lock.is_owned() and
not self.__owners[threading.currentThread()]):
if not (self.__lock.is_owned() or
self.__owners[threading.currentThread()]):
del self.__owners[threading.currentThread()]
def list_owned(self):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment