[pypy-commit] pypy default: check and raise when shell = True
mattip
noreply at buildbot.pypy.org
Wed Jun 11 22:42:22 CEST 2014
Author: mattip <matti.picus at gmail.com>
Branch:
Changeset: r72024:eed854395434
Date: 2014-06-11 21:56 +0300
http://bitbucket.org/pypy/pypy/changeset/eed854395434/
Log: check and raise when shell = True
diff --git a/rpython/tool/runsubprocess.py b/rpython/tool/runsubprocess.py
--- a/rpython/tool/runsubprocess.py
+++ b/rpython/tool/runsubprocess.py
@@ -35,6 +35,10 @@
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):
+ # Setting shell=True on windows messes up expected exceptions
+ raise EnvironmentError(stderr)
return pipe.returncode, stdout, stderr
More information about the pypy-commit
mailing list