minor bug fix

This commit is contained in:
Bernardo Damele 2012-01-13 16:57:45 +00:00
parent b03f91437b
commit e59ace5409

View File

@ -62,7 +62,9 @@ def direct(query, content=True):
output = timeout(func=conf.dbmsConnector.select, args=(query,), duration=conf.timeout, default=None) output = timeout(func=conf.dbmsConnector.select, args=(query,), duration=conf.timeout, default=None)
threadData.lastQueryDuration = calculateDeltaSeconds(start) threadData.lastQueryDuration = calculateDeltaSeconds(start)
if output is None or len(output) == 0: if isinstance(output, bool):
return output
elif output is None or len(output) == 0:
return None return None
elif content: elif content:
if conf.hostname not in kb.resumedQueries or ( conf.hostname in kb.resumedQueries and query not in kb.resumedQueries[conf.hostname] ): if conf.hostname not in kb.resumedQueries or ( conf.hostname in kb.resumedQueries and query not in kb.resumedQueries[conf.hostname] ):