Raise TransactionActive instead of returning False.

This commit is contained in:
voussoir 2025-03-24 22:15:58 -07:00
parent 9385b365cd
commit 924e5b4bdc

View file

@ -227,7 +227,7 @@ class Database(metaclass=abc.ABCMeta):
# time here.
thread_id = threading.current_thread().ident
if self._worms_transaction_owner == thread_id:
return False
raise TransactionActive()
log.loud(f'{thread_id} wants the transaction lock.')
self._worms_transaction_lock.acquire()