fix for a bug reported by malice.anon@gmail.com (TypeError: encode() takes no keyword arguments)

This commit is contained in:
Miroslav Stampar 2011-01-31 09:28:16 +00:00
parent 9fc0bedea8
commit f7feebe0df

View File

@ -587,7 +587,7 @@ def dataToStdout(data, forceOutput=False):
try:
sys.stdout.write(data.encode(sys.stdout.encoding))
except:
sys.stdout.write(data.encode(UNICODE_ENCODING, errors="replace"))
sys.stdout.write(data.encode(UNICODE_ENCODING))
finally:
sys.stdout.flush()