Commit 9b154270 authored by Michael Hanselmann's avatar Michael Hanselmann
Browse files

locking: Append to list outside error handling block

Signed-off-by: default avatarMichael Hanselmann <>
Reviewed-by: default avatarGuido Trotter <>
parent 56452af7
......@@ -895,7 +895,6 @@ class LockSet:
for lname in utils.UniqueSequence(names):
lock = self.__lockdict[lname] # raises KeyError if lock is not there
acquire_list.append((lname, lock))
except KeyError:
if want_all:
# We are acquiring all the set, it doesn't matter if this particular
......@@ -904,6 +903,8 @@ class LockSet:
raise errors.LockError("Non-existing lock in set (%s)" % lname)
acquire_list.append((lname, lock))
# This will hold the locknames we effectively acquired.
acquired = set()
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