Author: Amaury Forgeot d'Arc <amaur...@gmail.com>
Branch: py3.5
Changeset: r90920:1fb74e166444
Date: 2017-04-02 17:09 +0200
http://bitbucket.org/pypy/pypy/changeset/1fb74e166444/

Log:    Popen.communicate() returns bytes if no encoding was specified.

diff --git a/rpython/tool/runsubprocess.py b/rpython/tool/runsubprocess.py
--- a/rpython/tool/runsubprocess.py
+++ b/rpython/tool/runsubprocess.py
@@ -49,7 +49,7 @@
     pipe = Popen(args, stdout=PIPE, stderr=PIPE, shell=shell, env=env, cwd=cwd)
     stdout, stderr = pipe.communicate()
     if (sys.platform == 'win32' and pipe.returncode == 1 and 
-        'is not recognized' in stderr):
+        b'is not recognized' in stderr):
         # Setting shell=True on windows messes up expected exceptions
         raise EnvironmentError(stderr)
     return pipe.returncode, stdout, stderr
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to