1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

fixes issue where nxos module will fail due to KeyError (#22966)

Updates nxos action handler to handle deleting provider key if exists or
silently continuing if a  KeyError is raised.
This commit is contained in:
Peter Sprygada 2017-03-25 07:45:08 -04:00 committed by GitHub
parent e93cdecef1
commit 6a414371a1

View file

@ -117,7 +117,11 @@ class ActionModule(_ActionModule):
self._task.args['transport'] = transport
result = super(ActionModule, self).run(tmp, task_vars)
del result['invocation']['module_args']['provider']
try:
del result['invocation']['module_args']['provider']
except KeyError:
pass
return result