[py-svn] py-trunk commit c366f6ebdbde: a fix from maciej who claims this fixes issues on some systems.

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Thu Jun 17 18:01:07 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 1276790676 -7200
# Node ID c366f6ebdbde0d0d1b56c189f3234cd7141f2eca
# Parent  a9febe68a28b0833ec722f122db8fc34c46e27e3
a fix from maciej who claims this fixes issues on some systems.
passes all tests so i just apply it.

--- a/py/_process/cmdexec.py
+++ b/py/_process/cmdexec.py
@@ -18,8 +18,8 @@ def cmdexec(cmd):
             universal_newlines=True,
             stdout=subprocess.PIPE, stderr=subprocess.PIPE)
     out, err = process.communicate()
-    out = py.builtin._totext(out, sys.getdefaultencoding())
-    err = py.builtin._totext(err, sys.getdefaultencoding())
+    out = py.builtin._totext(out, sys.stdout.encoding)
+    err = py.builtin._totext(err, sys.stderr.encoding)
     status = process.poll()
     if status:
         raise ExecutionFailed(status, status, cmd, out, err)



More information about the pytest-commit mailing list