Skip to content

Commit

Permalink
Ref: saltstack#47689 - document additional kwarg passed to pip._check…
Browse files Browse the repository at this point in the history
…_if_installed function
  • Loading branch information
OrlandoArcapix committed Jun 15, 2018
1 parent 0d19803 commit eac0178
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions salt/states/pip_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,9 +187,21 @@ def _check_pkg_version_format(pkg):
def _check_if_installed(prefix, state_pkg_name, version_spec, ignore_installed,
force_reinstall, upgrade, user, cwd, bin_env, env_vars,
pip_list=False, **kwargs):
# result: None means the command failed to run
# result: True means the package is installed
# result: False means the package is not installed
'''
Takes a package name and version specification (if any) and checks it is
installed
Keyword arguments include:
pip_list: optional dict of installed pip packages, and their versions,
to search through to check if the package is installed. If not
provided, one will be generated in this function by querying the
system.
Returns:
result: None means the command failed to run
result: True means the package is installed
result: False means the package is not installed
'''
ret = {'result': False, 'comment': None}

# If we are not passed a pip list, get one:
Expand Down

0 comments on commit eac0178

Please sign in to comment.