code refactoring regarding standard output suppression and some threading issues

This commit is contained in:
Miroslav Stampar
2010-12-21 14:21:24 +00:00
parent 0e68248f60
commit 385e208f38
8 changed files with 27 additions and 18 deletions

View File

@@ -427,7 +427,9 @@ def filePathToString(filePath):
return strRepl
def dataToStdout(data, forceOutput=False):
if forceOutput or conf.verbose > 0:
if (forceOutput or conf.verbose > 0)\
and not ('threadException' in kb and kb.threadException)\
and not ('disableStdOut' in kb and kb.disableStdOut):
try:
sys.stdout.write(data)
sys.stdout.flush()