From c76743ee0ca5e288f94d22bb70eef0f41bb10d2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 12 Apr 2021 22:08:36 +0200 Subject: [PATCH] Keep raising exception when DB path of SQLite does not exist issue10101 --- trytond/backend/sqlite/database.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/trytond/backend/sqlite/database.py b/trytond/backend/sqlite/database.py index 088f59f70d..630abb1776 100644 --- a/trytond/backend/sqlite/database.py +++ b/trytond/backend/sqlite/database.py @@ -413,6 +413,8 @@ class Database(DatabaseInterface): else: db_path = safe_join( config.get('database', 'path'), self.name + '.sqlite') + if not os.path.isfile(db_path): + raise IOError("Database '%s' doesn't exist!" % db_path) db_uri = base_uri._replace(path=db_path) # Use unparse before replacing sqlite with file because SQLite accepts