Raise TransactionActive instead of returning False.
This commit is contained in:
parent
9385b365cd
commit
924e5b4bdc
1 changed files with 1 additions and 1 deletions
|
@ -227,7 +227,7 @@ class Database(metaclass=abc.ABCMeta):
|
||||||
# time here.
|
# time here.
|
||||||
thread_id = threading.current_thread().ident
|
thread_id = threading.current_thread().ident
|
||||||
if self._worms_transaction_owner == thread_id:
|
if self._worms_transaction_owner == thread_id:
|
||||||
return False
|
raise TransactionActive()
|
||||||
|
|
||||||
log.loud(f'{thread_id} wants the transaction lock.')
|
log.loud(f'{thread_id} wants the transaction lock.')
|
||||||
self._worms_transaction_lock.acquire()
|
self._worms_transaction_lock.acquire()
|
||||||
|
|
Loading…
Reference in a new issue