From 78e503d7b2f73ba820acdcfce969bdf0f70255e4 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Sat, 13 Feb 2016 21:25:01 +0100 Subject: [PATCH] Minor patch related to the #1706 --- lib/utils/hashdb.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/utils/hashdb.py b/lib/utils/hashdb.py index 8d1caa2bc..972dc7c17 100644 --- a/lib/utils/hashdb.py +++ b/lib/utils/hashdb.py @@ -80,8 +80,11 @@ class HashDB(object): for row in self.cursor.execute("SELECT value FROM storage WHERE id=?", (hash_,)): retVal = row[0] except sqlite3.OperationalError, ex: - if not "locked" in getSafeExString(ex): + if not any(_ in getSafeExString(ex) for _ in ("locked", "no such table")): raise + else: + debugMsg = "problem occurred while accessing session file '%s' ('%s')" % (self.filepath, getSafeExString(ex)) + logger.debug(debugMsg) except sqlite3.DatabaseError, ex: errMsg = "error occurred while accessing session file '%s' ('%s'). " % (self.filepath, getSafeExString(ex)) errMsg += "If the problem persists please rerun with `--flush-session`"