﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
13173	entire admin_scripts test suite fails on Windows if sys.executable path has a space in it.	Gabriel Hurley	Gabriel Hurley	"This is an edge case to be sure, but it sure is annoying if you have Python installed somewhere funny...

If you have Python installed on Windows to a location like ""C:\Program Files\python2.6\"" then every test in regressiontests.admin_scripts will fail. This is due to the (known) poor escaping done by ``Popen``.

Simply quoting the sys.executable path isn't enough, because if ``Popen`` finds a quote at the beginning of ``args``, it strips that quote and automatically assumes it corresponds to a quote at the end of ``args`` and will fail with mismatched quotes without realizing what it's done.

The most common solution I could find is to double-quote the ``args`` string if you need it to properly handle the extra spaces.

The attached patch currently passes the tests with Python 2.6.4 on Ubuntu and Python 2.6.5 on Windows (both with and without spaces in the ``sys.executable`` path).

It's not an incredibly urgent bug, but I figured I'd add a fix here."		closed	Core (Management commands)	1.1		fixed	admin_scripts		Accepted	1	0	0	0	0	0
