From ee151be4cd932fa5a776a022e87846832838d366 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Fri, 21 Aug 2009 22:15:13 +0200 Subject: [PATCH] Close non-tested database for issue1135 --- trytond/backend/postgresql/database.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/trytond/backend/postgresql/database.py b/trytond/backend/postgresql/database.py index 2d3cc1d3a0..8ce13947b8 100644 --- a/trytond/backend/postgresql/database.py +++ b/trytond/backend/postgresql/database.py @@ -185,7 +185,10 @@ class Database(DatabaseInterface): cursor2 = database.cursor() if cursor2.test(): res.append(db_name) - cursor2.close(close=True) + cursor2.close(close=True) + else: + cursor2.close(close=True) + database.close() return res @staticmethod