mirror of
https://github.com/psycopg/psycopg2.git
synced 2024-11-25 02:13:44 +03:00
parent
155c739863
commit
b4b470c29a
|
@ -95,10 +95,10 @@ class AbstractConnectionPool(object):
|
||||||
"""Put away a connection."""
|
"""Put away a connection."""
|
||||||
if self.closed:
|
if self.closed:
|
||||||
raise PoolError("connection pool is closed")
|
raise PoolError("connection pool is closed")
|
||||||
|
|
||||||
if key is None:
|
if key is None:
|
||||||
key = self._rused.get(id(conn))
|
key = self._rused.get(id(conn))
|
||||||
|
if key is None:
|
||||||
if not key:
|
|
||||||
raise PoolError("trying to put unkeyed connection")
|
raise PoolError("trying to put unkeyed connection")
|
||||||
|
|
||||||
if len(self._pool) < self.minconn and not close:
|
if len(self._pool) < self.minconn and not close:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user