[py-svn] py-trunk commit fa64ba4988bf: fix bug on writing out objects with terminalwriter on windows
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Thu Jul 29 11:32:43 CEST 2010
# HG changeset patch -- Bitbucket.org
# Project py-trunk
# URL http://bitbucket.org/hpk42/py-trunk/overview
# User holger krekel <holger at merlinux.eu>
# Date 1280395944 -7200
# Node ID fa64ba4988bfdb0cf57f0332d1ff66cab04b374d
# Parent 3e28f12e7c443367ed0ed63f605aae68b96b512b
fix bug on writing out objects with terminalwriter on windows
--- a/py/_io/terminalwriter.py
+++ b/py/_io/terminalwriter.py
@@ -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:
More information about the pytest-commit
mailing list