Update database.py
Inverted logic means _release_internal will always fail on a rollback. Fixed and simplified.
This commit is contained in:
parent
9a91f3d113
commit
91c985b3e8
@ -80,7 +80,7 @@ class Database(object):
|
||||
self.local.must_release = True
|
||||
|
||||
def _release_internal(self):
|
||||
if not hasattr(self.local, 'must_release') and self.local.must_release:
|
||||
if getattr(self.local, 'must_release', None):
|
||||
self.lock.release()
|
||||
self.local.must_release = False
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user