Merge pull request #2556 from mrtizmo/develop

2 changes to pip.installed added repo param and ignore case
This commit is contained in:
Thomas S Hatch 2012-11-14 18:27:37 -08:00
commit 1978bb7a76

View File

@ -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,