Commit 6f14fc27 authored by Michael Hanselmann's avatar Michael Hanselmann
Browse files

mcpu: Make sure added locks are released on errors

Signed-off-by: default avatarMichael Hanselmann <>
Reviewed-by: default avatarGuido Trotter <>
parent 23683c26
......@@ -381,8 +381,6 @@ class Processor(object):
if acquired is None:
raise _LockAcquireTimeout()
lu.acquired_locks[level] = acquired
# Adding locks
add_locks = lu.add_locks[level]
......@@ -395,8 +393,11 @@ class Processor(object):
"Couldn't add locks (%s), probably because of a race condition"
" with another job, who added them first" % add_locks)
lu.acquired_locks[level] = add_locks
acquired = add_locks
lu.acquired_locks[level] = acquired
result = self._LockAndExecLU(lu, level + 1, calc_timeout)
if level in lu.remove_locks:
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