fix bug on writing out objects with terminalwriter on windows

--HG--
branch : trunk
This commit is contained in:
holger krekel 2010-07-29 11:32:24 +02:00
parent 74523a9d09
commit 92bfb58798
1 changed files with 2 additions and 0 deletions

View File

@ -204,6 +204,8 @@ class Win32ConsoleWriter(TerminalWriter):
attr |= FOREGROUND_BLACK # (oldcolors & 0x0007)
SetConsoleTextAttribute(handle, attr)
if not isinstance(self._file, WriteFile):
s = self._getbytestring(s)
self._file.write(s)
self._file.flush()
if oldcolors: