This commit is contained in:
Miroslav Stampar
2016-10-05 23:02:20 +02:00
parent b42dc6e7a5
commit c83d417298
3 changed files with 8 additions and 8 deletions

View File

@@ -885,12 +885,12 @@ def dataToStdout(data, forceOutput=False, bold=False, content_type=None, status=
else:
message = data
if hasattr(conf, "api"):
sys.stdout.write(message, status, content_type)
else:
sys.stdout.write(setColor(message, bold))
try:
if hasattr(conf, "api"):
sys.stdout.write(message, status, content_type)
else:
sys.stdout.write(setColor(message, bold))
sys.stdout.flush()
except IOError:
pass