NullLock.acquire takes exactly 1 argument (2 given)

Issue #97 resolved
Jamie Lennox
created an issue

So this is a transient bug in a keystone deployment i'm working on that i haven't figured out the source of yet, however the fix i think is reasonably clear.

The Null cache backed's NullLock.acquire does not accept any arguments [1] however it's called with wait=True [2] and so gives a ValueError. I'm not sure how this went unnoticed for so long or why I'm only seeing it on some runs, but the acquire function should definitely be accepting the wait parameter like other lock implementations.



Comments (2)

  1. Michael Bayer repo owner

    NullLock.acquire should accept wait parameter, return boolean

    The interface for acquiring locks specifies that they should accept and default to wait=True. NullLock wasn't implementing this correctly. Additionally, the acquire() function needs to return a boolean value to indicate that the lock was acquired (which in the case of NullLock is unconditional).

    Fixes: #97

    Change-Id: I45487cd602b562242e425395728a9ed7e78d797e Pull-request:

    → <<cset 97add35012d9>>

  2. Log in to comment