Skip to content

Commit

Permalink
Check for version in list of installed versions (#34864)
Browse files Browse the repository at this point in the history
* Find version in list of installed versions

* lint error
  • Loading branch information
jmacfar authored and Nicole Thomas committed Jul 22, 2016
1 parent 6394030 commit 815ffdf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions salt/modules/win_pkg.py
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,7 @@ def install(name=None, refresh=False, pkgs=None, saltenv='base', **kwargs):
version_num = _get_latest_pkg_version(pkginfo)

# Check if the version is already installed
if version_num == old.get(pkg_name) \
if version_num in old.get(pkg_name, '').split(',') \
or (pkg_name in old and old[pkg_name] == 'Not Found'):
# Desired version number already installed
ret[pkg_name] = {'current': version_num}
Expand Down Expand Up @@ -874,7 +874,7 @@ def remove(name=None, pkgs=None, version=None, **kwargs):
ret[target] = {'current': 'not installed'}
continue
else:
if not version_num == old.get(target) \
if version_num not in old.get(target, '').split(',') \
and not old.get(target) == "Not Found" \
and version_num != 'latest':
log.error('{0} {1} not installed'.format(target, version))
Expand Down

0 comments on commit 815ffdf

Please sign in to comment.