minor optimization

This commit is contained in:
Miroslav Stampar 2011-10-10 17:45:16 +00:00
parent 4989e8e6d3
commit dacfeafc5f

View File

@ -10,6 +10,7 @@ See the file 'doc/COPYING' for copying permission
import hashlib import hashlib
import sqlite3 import sqlite3
from lib.core.data import conf
from lib.core.settings import UNICODE_ENCODING from lib.core.settings import UNICODE_ENCODING
from lib.core.threads import getCurrentThreadData from lib.core.threads import getCurrentThreadData
@ -45,7 +46,7 @@ class HashDB(object):
def retrieve(self, key): def retrieve(self, key):
retVal = None retVal = None
if key: if key and not any([conf.flushSession, conf.freshQueries]):
hash_ = self.hashKey(key) hash_ = self.hashKey(key)
while True: while True:
try: try: