mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
Merge pull request #7259 from terminalmage/issue7257
Fix regression in pkg.latest_version
This commit is contained in:
commit
64b6c5152a
@ -137,9 +137,6 @@ def latest_version(*names, **kwargs):
|
||||
kwargs.pop('fromrepo', None)
|
||||
kwargs.pop('repo', None)
|
||||
|
||||
if kwargs:
|
||||
raise TypeError('Got unexpected keyword argument(s): {0!r}'.format(kwargs))
|
||||
|
||||
if len(names) == 0:
|
||||
return ''
|
||||
ret = {}
|
||||
|
@ -121,8 +121,6 @@ def latest_version(*names, **kwargs):
|
||||
salt '*' pkg.latest_version <package1> <package2> <package3>
|
||||
'''
|
||||
kwargs.pop('refresh', True)
|
||||
if kwargs:
|
||||
raise TypeError('Got unexpected keyword argument(s): {0!r}'.format(kwargs))
|
||||
|
||||
if len(names) <= 1:
|
||||
return ''
|
||||
|
@ -171,8 +171,6 @@ def latest_version(*names, **kwargs):
|
||||
salt '*' pkg.latest_version <package1> <package2> <package3> ...
|
||||
'''
|
||||
refresh = salt.utils.is_true(kwargs.pop('refresh', True))
|
||||
if kwargs:
|
||||
raise TypeError('Got unexpected keyword argument(s): {0!r}'.format(kwargs))
|
||||
|
||||
if len(names) == 0:
|
||||
return ''
|
||||
|
@ -69,8 +69,6 @@ def latest_version(*names, **kwargs):
|
||||
'''
|
||||
|
||||
refresh = salt.utils.is_true(kwargs.pop('refresh', True))
|
||||
if kwargs:
|
||||
raise TypeError('Got unexpected keyword argument(s): {0!r}'.format(kwargs))
|
||||
|
||||
ret = {}
|
||||
|
||||
|
@ -81,8 +81,6 @@ def latest_version(*names, **kwargs):
|
||||
salt '*' pkg.latest_version <package name>
|
||||
'''
|
||||
kwargs.pop('refresh', True)
|
||||
if kwargs:
|
||||
raise TypeError('Got unexpected keyword argument(s): {0!r}'.format(kwargs))
|
||||
|
||||
pkgs = list_pkgs()
|
||||
ret = {}
|
||||
|
@ -45,8 +45,6 @@ def latest_version(*names, **kwargs):
|
||||
salt '*' pkg.latest_version <package1> <package2> <package3> ...
|
||||
'''
|
||||
refresh = salt.utils.is_true(kwargs.pop('refresh', True))
|
||||
if kwargs:
|
||||
raise TypeError('Got unexpected keyword argument(s): {0!r}'.format(kwargs))
|
||||
|
||||
if len(names) == 0:
|
||||
return ''
|
||||
|
@ -113,8 +113,6 @@ def latest_version(*names, **kwargs):
|
||||
'''
|
||||
|
||||
refresh = salt.utils.is_true(kwargs.pop('refresh', True))
|
||||
if kwargs:
|
||||
raise TypeError('Got unexpected keyword argument(s): {0!r}'.format(kwargs))
|
||||
|
||||
pkglist = {}
|
||||
pkgin = _check_pkgin()
|
||||
|
@ -73,8 +73,6 @@ def latest_version(pkg_name, **kwargs):
|
||||
'''
|
||||
|
||||
kwargs.pop('refresh', True)
|
||||
if kwargs:
|
||||
raise TypeError('Got unexpected keyword argument(s): {0!r}'.format(kwargs))
|
||||
|
||||
cmd = 'pkg info {0}'.format(pkg_name)
|
||||
out = __salt__['cmd.run'](cmd).split()
|
||||
|
@ -186,8 +186,6 @@ def latest_version(*names, **kwargs):
|
||||
salt '*' pkgutil.latest_version <package1> <package2> <package3> ...
|
||||
'''
|
||||
refresh = salt.utils.is_true(kwargs.pop('refresh', True))
|
||||
if kwargs:
|
||||
raise TypeError('Got unexpected keyword argument(s): {0!r}'.format(kwargs))
|
||||
|
||||
if not names:
|
||||
return ''
|
||||
|
@ -128,8 +128,6 @@ def latest_version(*names, **kwargs):
|
||||
package.
|
||||
'''
|
||||
kwargs.pop('refresh', True)
|
||||
if kwargs:
|
||||
raise TypeError('Got unexpected keyword argument(s): {0!r}'.format(kwargs))
|
||||
|
||||
ret = {}
|
||||
if not names:
|
||||
|
@ -74,8 +74,6 @@ def latest_version(*names, **kwargs):
|
||||
salt '*' pkg.latest_version <package1> <package2> <package3> ...
|
||||
'''
|
||||
refresh = salt.utils.is_true(kwargs.pop('refresh', True))
|
||||
if kwargs:
|
||||
raise TypeError('Got unexpected keyword argument(s): {0!r}'.format(kwargs))
|
||||
|
||||
if len(names) == 0:
|
||||
return ''
|
||||
|
Loading…
Reference in New Issue
Block a user