|
|
|
|
@ -128,9 +128,15 @@ def display(msg, color=None, stderr=False, screen_only=False, log_only=False, ru
|
|
|
|
|
msg2 = stringc(msg, color)
|
|
|
|
|
if not log_only:
|
|
|
|
|
if not stderr:
|
|
|
|
|
print msg2
|
|
|
|
|
try:
|
|
|
|
|
print msg2
|
|
|
|
|
except UnicodeEncodeError:
|
|
|
|
|
print msg2.encode('utf-8')
|
|
|
|
|
else:
|
|
|
|
|
print >>sys.stderr, msg2
|
|
|
|
|
try:
|
|
|
|
|
print >>sys.stderr, msg2
|
|
|
|
|
except UnicodeEncodeError:
|
|
|
|
|
print >>sys.stderr, msg2.encode('utf-8')
|
|
|
|
|
if constants.DEFAULT_LOG_PATH != '':
|
|
|
|
|
while msg.startswith("\n"):
|
|
|
|
|
msg = msg.replace("\n","")
|
|
|
|
|
|