Fix redundant '--python' warning on Windows

This commit is contained in:
Jace Browning
2017-03-12 20:31:08 -04:00
parent 3366a32717
commit bfafa2294d
+7 -9
View File
@@ -344,15 +344,13 @@ def do_create_virtualenv(three=None, python=None):
# Pass a Python version to virtualenv, if needed.
if python:
click.echo('{0} {1} {2}'.format(crayons.yellow('Using'), crayons.red(python), crayons.yellow('to create virtualenv...')))
elif three is False:
python = 'python2'
elif three is True:
python = 'python3'
# Windows!
if os.name == 'nt':
click.echo('{0} If you are running on Windows, you should use the {1} option instead.'.format(crayons.red('Warning!'), crayons.green('--python')))
else:
if os.name == 'nt':
click.echo('{0} If you are running on Windows, you should use the {1} option instead.'.format(crayons.red('Warning!'), crayons.green('--python')))
if three is False:
python = 'python2'
elif three is True:
python = 'python3'
if python:
cmd = cmd + ['-p', python]