[FIX] sql_db: typo in previous patch for autodetection of closed connections

My bad, I did and undid this patch several times
in different manners and ended up commiting the
wrong one.

lp bug: https://launchpad.net/bugs/905257 fixed

bzr revid: odo@openerp.com-20130215151237-3ks21kfhjb2fvl2z
This commit is contained in:
Olivier Dony 2013-02-15 16:12:37 +01:00
parent 39c8290b3b
commit 979c28d0c9
1 changed files with 1 additions and 1 deletions

View File

@ -405,7 +405,7 @@ class ConnectionPool(object):
except psycopg2.OperationalError:
self._debug('Cannot reset connection at index %d: %r', i, cnx.dsn)
# psycopg2 2.4.4 and earlier do not allow closing a closed connection
if cnx.closed:
if not cnx.closed:
cnx.close()
if cnx.closed: