From e2afba1e9a78269e9d0a2ada38de520d03db9094 Mon Sep 17 00:00:00 2001 From: Sergi Almacellas Abellana Date: Sat, 24 Sep 2016 19:54:13 +0200 Subject: [PATCH] Ensure sqlite connection is set when initializing the database issue5906 review26721002 --- trytond/backend/sqlite/database.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trytond/backend/sqlite/database.py b/trytond/backend/sqlite/database.py index 139a1894e8..d74d949029 100644 --- a/trytond/backend/sqlite/database.py +++ b/trytond/backend/sqlite/database.py @@ -303,7 +303,7 @@ class Database(DatabaseInterface): def init(self): from trytond.modules import get_module_info - with self._conn as conn: + with self.get_connection() as conn: cursor = conn.cursor() sql_file = os.path.join(os.path.dirname(__file__), 'init.sql') with open(sql_file) as fp: