From 655c2b1fb9052b192bf7be32f8af716ed8c1396d Mon Sep 17 00:00:00 2001 From: Nicolas Sebrecht Date: Fri, 13 Feb 2015 17:18:07 +0100 Subject: [PATCH] sqlite: provide offending filename when open fails Signed-off-by: Nicolas Sebrecht --- offlineimap/folder/LocalStatusSQLite.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/offlineimap/folder/LocalStatusSQLite.py b/offlineimap/folder/LocalStatusSQLite.py index a53b48e..c66ca44 100644 --- a/offlineimap/folder/LocalStatusSQLite.py +++ b/offlineimap/folder/LocalStatusSQLite.py @@ -67,8 +67,9 @@ class LocalStatusSQLiteFolder(BaseFolder): self.connection = sqlite.connect(self.filename, check_same_thread=False) except NameError: # sqlite import had failed - raise UserWarning('SQLite backend chosen, but no sqlite python ' - 'bindings available. Please install.'), None, exc_info()[2] + raise UserWarning("SQLite backend chosen, but cannot connect " + "with available bindings to '%s'. Is the sqlite3 package " + "installed?."% self.filename), None, exc_info()[2] #Make sure sqlite is in multithreading SERIALIZE mode assert sqlite.threadsafety == 1, 'Your sqlite is not multithreading safe.'