salt/modules/brew.py: add kwargs to list_upgrades

This is done for API compatibility
This commit is contained in:
Erik Johnson 2016-06-08 16:28:17 -05:00
parent 4f11c16d86
commit b40fc9bc62

View File

@ -332,7 +332,7 @@ def install(name=None, pkgs=None, taps=None, options=None, **kwargs):
return salt.utils.compare_dicts(old, new)
def list_upgrades(refresh=True):
def list_upgrades(refresh=True, **kwargs): # pylint: disable=W0613
'''
Check whether or not an upgrade is available for all packages
@ -348,14 +348,12 @@ def list_upgrades(refresh=True):
cmd = 'brew outdated'
call = _call_brew(cmd)
if call['retcode'] != 0:
comment = ''
if 'stderr' in call:
comment += call['stderr']
if 'stdout' in call:
comment += call['stdout']
raise CommandExecutionError(
'{0}'.format(comment)
)
msg = 'Failed to get upgrades'
for key in ('stderr', 'stdout'):
if call[key]:
msg += ': ' + call[key]
break
raise CommandExecutionError(msg)
else:
out = call['stdout']
return out.splitlines()