mirror of
https://github.com/psycopg/psycopg2.git
synced 2024-11-29 20:23:45 +03:00
Indentation fixes.
This commit is contained in:
parent
39136e1af4
commit
a6b4a8b092
16
lib/pool.py
16
lib/pool.py
|
@ -82,14 +82,14 @@ class AbstractConnectionPool(object):
|
||||||
if self._used.has_key(key):
|
if self._used.has_key(key):
|
||||||
return self._used[key]
|
return self._used[key]
|
||||||
|
|
||||||
if self._pool:
|
if self._pool:
|
||||||
self._used[key] = conn = self._pool.pop()
|
self._used[key] = conn = self._pool.pop()
|
||||||
self._rused[id(conn)] = key
|
self._rused[id(conn)] = key
|
||||||
return conn
|
return conn
|
||||||
else:
|
else:
|
||||||
if len(self._used) == self.maxconn:
|
if len(self._used) == self.maxconn:
|
||||||
raise PoolError("connection pool exausted")
|
raise PoolError("connection pool exausted")
|
||||||
return self._connect(key)
|
return self._connect(key)
|
||||||
|
|
||||||
def _putconn(self, conn, key=None, close=False):
|
def _putconn(self, conn, key=None, close=False):
|
||||||
"""Put away a connection."""
|
"""Put away a connection."""
|
||||||
|
|
Loading…
Reference in New Issue
Block a user