Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b1f3110

Browse files
committed
Removing that ugly disk I/O error in live testing mode
1 parent 934808f commit b1f3110

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

lib/utils/hashdb.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,10 @@ def flush(self, forced=False):
111111
except sqlite3.IntegrityError:
112112
self.cursor.execute("UPDATE storage SET value=? WHERE id=?", (value, hash_,))
113113
except sqlite3.OperationalError, ex:
114+
if not os.path.exists(self.filepath):
115+
debugMsg = "session file '%s' does not exist" % self.filepath
116+
logger.debug(debugMsg)
117+
break
114118

115119
if retries == 0:
116120
warnMsg = "there has been a problem while writing to "

0 commit comments

Comments
 (0)