Author: Armin Rigo <[email protected]>
Branch: py3.5
Changeset: r89517:8b095830ab66
Date: 2017-01-12 16:30 +0100
http://bitbucket.org/pypy/pypy/changeset/8b095830ab66/

Log:    Fix the hack: it's possible to call subprocess.Popen() with a
        generator or other lazy object as 'args'

diff --git a/lib-python/3/subprocess.py b/lib-python/3/subprocess.py
--- a/lib-python/3/subprocess.py
+++ b/lib-python/3/subprocess.py
@@ -849,7 +849,7 @@
 
         # --- PyPy hack, see _pypy_install_libs_after_virtualenv() ---
         # match arguments passed by different versions of virtualenv
-        if args[1:] in (
+        if type(args) is list and args[1:] in (
             ['-c', 'import sys; print(sys.prefix)'],        # 1.6 10ba3f3c
             ['-c', "\nimport sys\nprefix = sys.prefix\n"    # 1.7 0e9342ce
              "if sys.version_info[0] == 3:\n"
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to