mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 17:09:03 +00:00
Merge pull request #2556 from mrtizmo/develop
2 changes to pip.installed added repo param and ignore case
This commit is contained in:
commit
1978bb7a76
@ -23,6 +23,7 @@ def installed(name,
|
||||
log=None,
|
||||
proxy=None,
|
||||
timeout=None,
|
||||
repo=None,
|
||||
editable=None,
|
||||
find_links=None,
|
||||
index_url=None,
|
||||
@ -69,7 +70,7 @@ def installed(name,
|
||||
ret['comment'] = 'Error installing \'{0}\': {1}'.format(name, err)
|
||||
return ret
|
||||
|
||||
if ignore_installed == False and name in pip_list:
|
||||
if ignore_installed == False and name.lower() in (p.lower() for p in pip_list):
|
||||
if force_reinstall == False and upgrade == False:
|
||||
ret['result'] = True
|
||||
ret['comment'] = 'Package already installed'
|
||||
@ -81,6 +82,9 @@ def installed(name,
|
||||
name)
|
||||
return ret
|
||||
|
||||
if repo:
|
||||
name = repo
|
||||
|
||||
pip_install_call = __salt__['pip.install'](
|
||||
pkgs=name,
|
||||
requirements=requirements,
|
||||
|
Loading…
Reference in New Issue
Block a user