Commits

Anonymous committed 5068654

[svn r3604] Add quotes on win32 when there is a space in the destination path

Comments (0)

Files changed (1)

             os.unlink(pth)
         os.symlink('python', pth)
 
+    if sys.platform == 'win32' and ' ' in py_executable:
+        # There's a bug with subprocess on Windows when using a first
+        # argument that has a space in it.  Instead we have to quote
+        # the value:
+        py_executable = '"%s"' % py_executable
     cmd = [py_executable, '-c', 'import sys; print sys.prefix']
     logger.info('Testing executable with %s %s "%s"' % tuple(cmd))
     proc = subprocess.Popen(cmd,