Merge "pgsql: fix self._conn.close() being called without connection"
This commit is contained in:
commit
743603a07c
|
@ -146,7 +146,8 @@ class PostgresLock(locking.Lock):
|
|||
try:
|
||||
return _lock()
|
||||
except Exception:
|
||||
self._conn.close()
|
||||
if self._conn:
|
||||
self._conn.close()
|
||||
raise
|
||||
|
||||
def release(self):
|
||||
|
|
Loading…
Reference in New Issue