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:
Erik Johnson 2016-08-29 18:43:12 -05:00
parent eda2ae0add
commit 123a611066

View file

@ -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]]