From 979c28d0c9a234dc1f75d7878e5dae2453277bde Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Fri, 15 Feb 2013 16:12:37 +0100 Subject: [PATCH] [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 --- openerp/sql_db.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openerp/sql_db.py b/openerp/sql_db.py index a41f5e5077e..1e46f0f9735 100644 --- a/openerp/sql_db.py +++ b/openerp/sql_db.py @@ -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: