Errors acquiring or releasing a lock
| 105 | |
| 106 | |
| 107 | class LockError(RedisError, ValueError): |
| 108 | "Errors acquiring or releasing a lock" |
| 109 | |
| 110 | # NOTE: For backwards compatibility, this class derives from ValueError. |
| 111 | # This was originally chosen to behave like threading.Lock. |
| 112 | |
| 113 | def __init__(self, message=None, lock_name=None): |
| 114 | super().__init__(message) |
| 115 | self.message = message |
| 116 | self.lock_name = lock_name |
| 117 | |
| 118 | |
| 119 | class LockNotOwnedError(LockError): |