From be91a5622af8ccdfeae75d2e0d54333a3b651bc4 Mon Sep 17 00:00:00 2001 From: jedelman8 Date: Tue, 19 Apr 2016 10:01:18 -0700 Subject: [PATCH] fix index for portchannel --- lib/ansible/modules/network/nxos/nxos_switchport.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/modules/network/nxos/nxos_switchport.py b/lib/ansible/modules/network/nxos/nxos_switchport.py index e6a74ed66e..8e17c41c7d 100644 --- a/lib/ansible/modules/network/nxos/nxos_switchport.py +++ b/lib/ansible/modules/network/nxos/nxos_switchport.py @@ -205,7 +205,7 @@ def interface_is_portchannel(interface, module): intf_type = get_interface_type(interface) if intf_type == 'ethernet': command = 'show interface ' + interface - body = execute_show_command(command, module)[0] + body = execute_show_command(command, module) try: interface_table = body[0]['TABLE_interface']['ROW_interface'] except (KeyError, AttributeError, IndexError):