Merge pull request #18865 from jfindlay/venv_python

allow lookup of python on system path fix: #18852
This commit is contained in:
Thomas S Hatch 2014-12-10 10:19:38 -07:00
commit fb1577e893

View File

@ -176,10 +176,9 @@ def create(path,
cmd.append('--distribute')
if python is not None and python.strip() != '':
if not os.access(python, os.X_OK):
if not salt.utils.which(python):
raise salt.exceptions.CommandExecutionError(
'Requested python ({0}) does not appear '
'executable.'.format(python)
'Cannot find requested python ({0}).'.format(python)
)
cmd.append('--python={0}'.format(python))
if extra_search_dir is not None: