mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-04-26 03:43:46 +03:00
minor speedup
This commit is contained in:
parent
b02363b1aa
commit
0a6334db22
|
@ -836,10 +836,11 @@ def singleTimeLogMessage(message, level=logging.INFO, flag=None):
|
||||||
logger.log(level, message)
|
logger.log(level, message)
|
||||||
|
|
||||||
def dataToStdout(data, forceOutput=False):
|
def dataToStdout(data, forceOutput=False):
|
||||||
if not ('threadException' in kb and kb.threadException):
|
if not kb.get("threadException"):
|
||||||
if forceOutput or not getCurrentThreadData().disableStdOut:
|
if forceOutput or not getCurrentThreadData().disableStdOut:
|
||||||
try:
|
try:
|
||||||
logging._acquireLock()
|
if kb.get("multiThreadMode"):
|
||||||
|
logging._acquireLock()
|
||||||
# Reference: http://bugs.python.org/issue1602
|
# Reference: http://bugs.python.org/issue1602
|
||||||
if IS_WIN:
|
if IS_WIN:
|
||||||
output = data.encode('ascii', "replace")
|
output = data.encode('ascii', "replace")
|
||||||
|
@ -861,7 +862,8 @@ def dataToStdout(data, forceOutput=False):
|
||||||
sys.stdout.write(data.encode(UNICODE_ENCODING))
|
sys.stdout.write(data.encode(UNICODE_ENCODING))
|
||||||
finally:
|
finally:
|
||||||
sys.stdout.flush()
|
sys.stdout.flush()
|
||||||
logging._releaseLock()
|
if kb.get("multiThreadMode"):
|
||||||
|
logging._releaseLock()
|
||||||
|
|
||||||
def dataToSessionFile(data):
|
def dataToSessionFile(data):
|
||||||
if not conf.sessionFile or kb.suppressSession:
|
if not conf.sessionFile or kb.suppressSession:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user