From b1f31103f9e661e1dfdccf8cc3e9e655625f5748 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Tue, 5 Feb 2013 17:04:42 +0100 Subject: [PATCH] Removing that ugly disk I/O error in live testing mode --- lib/utils/hashdb.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/utils/hashdb.py b/lib/utils/hashdb.py index 4e3f1a4e6..0d06c2e34 100644 --- a/lib/utils/hashdb.py +++ b/lib/utils/hashdb.py @@ -111,6 +111,10 @@ class HashDB(object): except sqlite3.IntegrityError: self.cursor.execute("UPDATE storage SET value=? WHERE id=?", (value, hash_,)) except sqlite3.OperationalError, ex: + if not os.path.exists(self.filepath): + debugMsg = "session file '%s' does not exist" % self.filepath + logger.debug(debugMsg) + break if retries == 0: warnMsg = "there has been a problem while writing to "