Keep raising exception when DB path of SQLite does not exist

issue10101
This commit is contained in:
Cédric Krier
2021-04-12 22:08:36 +02:00
parent ffe62f46e8
commit c76743ee0c
+2
View File
@@ -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