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.
(cherry picked from commit 6a414371a1)
pull/22995/head
Peter Sprygada 8 years ago committed by Peter Sprygada
parent 75d19442e3
commit d1ed72ad37

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

Loading…
Cancel
Save