Only check for the execution bits if a value was actually passed.

This commit is contained in:
Pedro Algarvio 2013-11-28 10:50:15 +00:00
parent 998775e974
commit 88692e9e4b

View File

@ -161,11 +161,13 @@ def create(path,
)
else:
cmd.append('--distribute')
if not os.access(python, os.X_OK):
raise salt.exceptions.CommandExecutionError(
'Requested python ({0}) does not appear executable.'.format(python)
)
if python is not None and python.strip() != '':
if not os.access(python, os.X_OK):
raise salt.exceptions.CommandExecutionError(
'Requested python ({0}) does not appear '
'executable.'.format(python)
)
cmd.append('--python={0}'.format(python))
if extra_search_dir is not None:
if isinstance(extra_search_dir, basestring) and \