Display the path of the database in error message

Instead of just the filename.

issue8995
review288881002
This commit is contained in:
Cédric Krier
2020-01-29 00:05:32 +01:00
parent 750ad14bb2
commit 3d20f1b64e
+1 -1
View File
@@ -342,7 +342,7 @@ class Database(DatabaseInterface):
db_filename = self.name + '.sqlite'
path = os.path.join(config.get('database', 'path'), db_filename)
if not os.path.isfile(path):
raise IOError('Database "%s" doesn\'t exist!' % db_filename)
raise IOError('Database "%s" doesn\'t exist!' % path)
if self._conn is not None:
return self
self._conn = sqlite.connect(path,