Fix bug with pip() installer when upgrade_strategy = None
This commit is contained in:
parent
d519db62bd
commit
fa2f7dfcbd
|
@ -58,13 +58,13 @@ def pip(*packages, **kwargs):
|
|||
"""
|
||||
Install one or more packages via ``pip install``.
|
||||
"""
|
||||
upgrade_strategy = kwargs.pop('upgrade_strategy', '')
|
||||
upgrade_strategy = kwargs.pop('upgrade_strategy', None)
|
||||
if upgrade_strategy:
|
||||
upgrade_strategy = '--upgrade-strategy {}'.format(upgrade_strategy)
|
||||
if kwargs:
|
||||
abort("Unknown kwargs for pip(): {}".format(kwargs))
|
||||
packages = ["'{}'".format(p) for p in packages]
|
||||
sudo('pip install --upgrade {} {}'.format(upgrade_strategy, ' '.join(packages)))
|
||||
sudo('pip install --upgrade {} {}'.format(upgrade_strategy or '', ' '.join(packages)))
|
||||
|
||||
|
||||
def install_virtualenvwrapper(workon_home=None, user='root', use_apt=False):
|
||||
|
|
Loading…
Reference in a new issue