changeset 41723b243136 in trytond:default
details: https://hg.tryton.org/trytond?cmd=changeset&node=41723b243136
description:
Keep raising exception when DB path of SQLite does not exist
issue10101
diffstat:
trytond/backend/sqlite/database.py | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diffs (12 lines):
diff -r e775cf82255f -r 41723b243136 trytond/backend/sqlite/database.py
--- a/trytond/backend/sqlite/database.py Mon Apr 12 20:56:08 2021 +0200
+++ b/trytond/backend/sqlite/database.py Mon Apr 12 22:08:36 2021 +0200
@@ -413,6 +413,8 @@
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