mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
pacman.py: Fix incorrect return in pkg.latest_version
This was initially broken in 75fd92f
. The documented behavior of this
function is to return an empty string for the package when the package
is up-to-date. Changing that behavior negatively affects the pkg.latest
state, which relies on the documented behavior.
This commit is contained in:
parent
eda2ae0add
commit
123a611066
1 changed files with 0 additions and 8 deletions
|
@ -89,14 +89,6 @@ def latest_version(*names, **kwargs):
|
|||
except (ValueError, IndexError):
|
||||
pass
|
||||
|
||||
pkgs = {}
|
||||
|
||||
for name in names:
|
||||
if not ret[name]:
|
||||
if not pkgs:
|
||||
pkgs = list_pkgs()
|
||||
if name in pkgs:
|
||||
ret[name] = pkgs[name]
|
||||
# Return a string if only one package name passed
|
||||
if len(names) == 1:
|
||||
return ret[names[0]]
|
||||
|
|
Loading…
Add table
Reference in a new issue