mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Fix package status filtering on latest version
This commit is contained in:
parent
1fa1963895
commit
12d515fa0c
1 changed files with 2 additions and 1 deletions
|
@ -244,7 +244,8 @@ def latest_version(*names, **kwargs):
|
|||
package_info = info_available(*names)
|
||||
for name in names:
|
||||
pkg_info = package_info.get(name, {})
|
||||
if pkg_info.get('status', '').lower() in ['not installed', 'out-of-date']:
|
||||
status = pkg_info.get('status', '').lower()
|
||||
if status.find('not installed') > -1 or status.find('out-of-date') > -1:
|
||||
ret[name] = pkg_info.get('version')
|
||||
|
||||
# Return a string if only one package name passed
|
||||
|
|
Loading…
Add table
Reference in a new issue