step by step getting there to partial output presentation to restful API (issue #297), not quite yet though..

This commit is contained in:
Bernardo Damele
2013-02-03 22:09:33 +00:00
parent b55555e4e5
commit 9370f96a67
5 changed files with 24 additions and 11 deletions

View File

@@ -89,7 +89,12 @@ def bisection(payload, expression, length=None, charsetType=None, firstChar=None
try:
# Set kb.partRun in case "common prediction" feature (a.k.a. "good
# samaritan") is used or the engine is called from the API
kb.partRun = getPartRun() if conf.predictOutput or hasattr(conf, "api") else None
if conf.predictOutput:
kb.partRun = getPartRun()
elif hasattr(conf, "api"):
kb.partRun = getPartRun(alias=False)
else:
kb.partRun = None
if partialValue:
firstChar = len(partialValue)