fixes exception raised when nxos_facts uses nxapi transport (#4988)
This fixes a condition where an exception is raised when collecting `interface` facts and the transport is set to nxapi in the nxos_nxapi module. fixes ansible/ansible#17691
This commit is contained in:
parent
d843204575
commit
13c7288aea
1 changed files with 3 additions and 3 deletions
|
@ -276,11 +276,11 @@ class Interfaces(FactsBase):
|
|||
def commands(self):
|
||||
add_command(self.runner, 'show interface', output='json')
|
||||
|
||||
resp = self.module.cli(['show ipv6 interface | wc lines'])
|
||||
if int(resp[0]) > 1:
|
||||
try:
|
||||
self.module.cli('show ipv6 interface', 'json')
|
||||
add_command(self.runner, 'show ipv6 interface', output='json')
|
||||
self.ipv6 = True
|
||||
else:
|
||||
except NetworkError:
|
||||
self.ipv6 = False
|
||||
|
||||
try:
|
||||
|
|
Loading…
Reference in a new issue