add kwargs to available_version

This will avoid tracebacks once #3687 is implemented
This commit is contained in:
Erik Johnson 2013-03-09 19:46:44 -06:00
parent 8cad5ab705
commit dd0715a83b
10 changed files with 12 additions and 13 deletions

View File

@ -60,7 +60,7 @@ def version(*names):
return ret
def available_version(*names):
def available_version(*names, **kwargs):
'''
Return the latest version of the named package available for upgrade or
installation

View File

@ -59,7 +59,7 @@ def _cpv_to_version(cpv):
return str(cpv[len(_cpv_to_name(cpv) + '-'):])
def available_version(*names):
def available_version(*names, **kwargs):
'''
Return the latest version of the named package available for upgrade or
installation. If more than one package name is specified, a dict of

View File

@ -48,7 +48,7 @@ def search(pkg_name):
return {"Results": res}
def available_version(*names):
def available_version(*names, **kwargs):
'''
Return the latest version of the named package available for upgrade or
installation. If more than one package name is specified, a dict of

View File

@ -75,7 +75,7 @@ def list_pkgs():
return _format_pkgs(_get_pkgs())
def available_version(name):
def available_version(name, **kwargs):
'''
The available version of the package in the repository
@ -158,7 +158,6 @@ def install(name=None, pkgs=None, sources=None, **kwargs):
return __salt__['pkg_resource.find_changes'](_format_pkgs(old), new)
def remove(name, **kwargs):
'''
Remove a single package with pkg_delete

View File

@ -28,7 +28,7 @@ def _list_removed(old, new):
return pkgs
def available_version(*names):
def available_version(*names, **kwargs):
'''
Return the latest version of the named package available for upgrade or
installation. If more than one package name is specified, a dict of

View File

@ -56,7 +56,7 @@ def version():
return __salt__['cmd.run'](cmd)
def available_version(pkg_name):
def available_version(pkg_name, **kwargs):
'''
The available version of the package in the repository

View File

@ -158,7 +158,7 @@ def version(name):
return ''
def available_version(name):
def available_version(name, **kwargs):
'''
The available version of the package in the repository

View File

@ -94,7 +94,7 @@ def list_pkgs():
return pkg
def available_version(*names):
def available_version(*names, **kwargs):
'''
Return the latest version of the named package available for upgrade or
installation. If more than one package name is specified, a dict of

View File

@ -47,7 +47,7 @@ def _list_removed(old, new):
return pkgs
def available_version(*names):
def available_version(*names, **kwargs):
'''
Return the latest version of the named package available for upgrade or
installation. If more than one package name is specified, a dict of
@ -79,7 +79,7 @@ def available_version(*names):
ret[name] = ''
if name in pkgs:
version = pkgs[name]
if __salt__['pkg_resource.perform_cmp'](str(candidate),
if __salt__['pkg_resource.perform_cmp'](str(candidate),
str(version)) > 0:
ret[name] = candidate
continue
@ -90,7 +90,7 @@ def available_version(*names):
ret[name] = ''
if name in pkgs:
version = pkgs[name]
if __salt__['pkg_resource.perform_cmp'](str(candidate),
if __salt__['pkg_resource.perform_cmp'](str(candidate),
str(version)) > 0:
ret[name] = candidate
return ret

View File

@ -66,7 +66,7 @@ def list_upgrades(refresh=True):
list_updates = list_upgrades
def available_version(*names):
def available_version(*names, **kwargs):
'''
Return the latest version of the named package available for upgrade or
installation. If more than one package name is specified, a dict of