more update related to last commits

This commit is contained in:
Miroslav Stampar 2012-02-24 10:57:23 +00:00
parent 570d3a19c2
commit 5afbd52b61
2 changed files with 6 additions and 1 deletions

View File

@ -732,9 +732,9 @@ def dataToStdout(data, forceOutput=False):
sys.stdout.write(data.encode(UNICODE_ENCODING))
finally:
sys.stdout.flush()
setFormatterPrependFlag(len(data) == 1)
if kb.get("multiThreadMode"):
logging._releaseLock()
setFormatterPrependFlag(len(data) == 1)
def dataToSessionFile(data):
if not conf.sessionFile or kb.suppressSession:

View File

@ -23,6 +23,7 @@ from lib.core.common import goGoodSamaritan
from lib.core.common import getPartRun
from lib.core.common import incrementCounter
from lib.core.common import safeStringFormat
from lib.core.common import setFormatterPrependFlag
from lib.core.common import singleTimeWarnMessage
from lib.core.data import conf
from lib.core.data import kb
@ -319,6 +320,8 @@ def bisection(payload, expression, length=None, charsetType=None, firstChar=None
progress.update(index)
progress.draw(eta)
setFormatterPrependFlag(True)
# Go multi-threading (--threads > 1)
if conf.threads > 1 and isinstance(length, int) and length > 1:
value = []
@ -504,6 +507,8 @@ def bisection(payload, expression, length=None, charsetType=None, firstChar=None
except KeyboardInterrupt:
abortedFlag = True
finally:
setFormatterPrependFlag(False)
if conf.verbose in (1, 2) or showEta:
dataToStdout("\n")