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.
pull/22971/head
Peter Sprygada 8 years ago committed by GitHub
parent e93cdecef1
commit 6a414371a1

@ -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

Loading…
Cancel
Save