From e59ace5409c352ecc8204365884487929a303d01 Mon Sep 17 00:00:00 2001 From: Bernardo Damele Date: Fri, 13 Jan 2012 16:57:45 +0000 Subject: [PATCH] minor bug fix --- lib/request/direct.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/request/direct.py b/lib/request/direct.py index 61a6fef38..f91c3fa45 100644 --- a/lib/request/direct.py +++ b/lib/request/direct.py @@ -62,7 +62,9 @@ def direct(query, content=True): output = timeout(func=conf.dbmsConnector.select, args=(query,), duration=conf.timeout, default=None) 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 elif content: if conf.hostname not in kb.resumedQueries or ( conf.hostname in kb.resumedQueries and query not in kb.resumedQueries[conf.hostname] ):