mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Fix behaviour of function latest_version in zypper module when multiple packages are passed to function.
Function now properly return dict with empty string as version if latest packages is already installed, and multiple packages are passed to function
This commit is contained in:
parent
0c0c05c2bc
commit
b354c6863c
1 changed files with 2 additions and 0 deletions
|
@ -581,6 +581,8 @@ def latest_version(*names, **kwargs):
|
|||
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')
|
||||
else:
|
||||
ret[name] = ''
|
||||
|
||||
# Return a string if only one package name passed
|
||||
if len(names) == 1 and len(ret):
|
||||
|
|
Loading…
Add table
Reference in a new issue