Don't allow a "repo" kwarg for pkgrepo.managed (#33477)

This is not a valid argument for any of the supported pkgrepo platforms,
and having it pass through to pkg.expand_repo_def results in a
traceback.
This commit is contained in:
Erik Johnson 2016-05-24 12:15:41 -05:00 committed by Nicole Thomas
parent b4071b07f1
commit 1dfa95651c

View file

@ -270,6 +270,13 @@ def managed(name, ppa=None, **kwargs):
ret['comment'] = 'Repo management not implemented on this platform'
return ret
if 'repo' in kwargs:
ret['result'] = False
ret['comment'] = ('\'repo\' is not a supported argument for this '
'state. The \'name\' argument is probably what was '
'intended.')
return ret
repo = name
if __grains__['os'] == 'Ubuntu':
if ppa is not None: