Removing that ugly disk I/O error in live testing mode

This commit is contained in:
Miroslav Stampar 2013-02-05 17:04:42 +01:00
parent 934808f53b
commit b1f31103f9

View File

@ -111,6 +111,10 @@ class HashDB(object):
except sqlite3.IntegrityError: except sqlite3.IntegrityError:
self.cursor.execute("UPDATE storage SET value=? WHERE id=?", (value, hash_,)) self.cursor.execute("UPDATE storage SET value=? WHERE id=?", (value, hash_,))
except sqlite3.OperationalError, ex: 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: if retries == 0:
warnMsg = "there has been a problem while writing to " warnMsg = "there has been a problem while writing to "