From f3acf9c929f573edb19ab58972a7b5950e586d2b Mon Sep 17 00:00:00 2001 From: Nathaniel Case Date: Thu, 13 Jul 2017 16:23:24 -0400 Subject: [PATCH] Fix NX-API json handling (#26716) --- lib/ansible/module_utils/nxos.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/ansible/module_utils/nxos.py b/lib/ansible/module_utils/nxos.py index 2c0db76757..52974d03b4 100644 --- a/lib/ansible/module_utils/nxos.py +++ b/lib/ansible/module_utils/nxos.py @@ -375,11 +375,9 @@ def to_command(module, commands): commands = transform(to_list(commands)) - for index, item in enumerate(commands): + for item in commands: if is_json(item['command']): item['output'] = 'json' - elif is_text(item['command']): - item['output'] = 'text' return commands