diff Lib/subprocess.py @ 63096:354546846c29 2.7

Issue #9265: Incorrect name passed as arg[0] when shell=True and executable specified.
author Stefan Krah <stefan@bytereef.org>
date Mon, 19 Jul 2010 14:41:08 +0000
parents da558461d9a9
children a0bdcdd0f086
line wrap: on
line diff
--- a/Lib/subprocess.py	Mon Jul 19 13:14:01 2010 +0000
+++ b/Lib/subprocess.py	Mon Jul 19 14:41:08 2010 +0000
@@ -1091,6 +1091,8 @@
 
             if shell:
                 args = ["/bin/sh", "-c"] + args
+                if executable:
+                    args[0] = executable
 
             if executable is None:
                 executable = args[0]