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