fix nxos_hsrp keyerror (#65796)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
This commit is contained in:
parent
683c467609
commit
cb2a45d286
1 changed files with 2 additions and 0 deletions
|
@ -191,6 +191,8 @@ def get_hsrp_group(group, interface, module):
|
|||
try:
|
||||
body = run_commands(module, [command])[0]
|
||||
hsrp_table = body['TABLE_grp_detail']['ROW_grp_detail']
|
||||
if 'sh_keystring_attr' not in hsrp_table:
|
||||
del hsrp_key['sh_keystring_attr']
|
||||
if 'unknown enum:' in str(hsrp_table):
|
||||
hsrp_table = get_hsrp_group_unknown_enum(module, command, hsrp_table)
|
||||
except (AttributeError, IndexError, TypeError, KeyError):
|
||||
|
|
Loading…
Reference in a new issue