mirror of
https://github.com/xcat2/confluent.git
synced 2024-11-28 20:39:40 +00:00
Handle malformed json data more gracefully
This commit is contained in:
parent
94a4a7e20b
commit
1a7c238b54
@ -811,7 +811,11 @@ def get_smm_neighbor_fingerprints(smmaddr, cv):
|
||||
if ':' in smmaddr:
|
||||
smmaddr = '[{0}]'.format(smmaddr)
|
||||
wc = webclient.SecureHTTPConnection(smmaddr, verifycallback=cv)
|
||||
neighs = wc.grab_json_response('/scripts/neighdata.json')
|
||||
try:
|
||||
neighs = wc.grab_json_response('/scripts/neighdata.json')
|
||||
except Exception:
|
||||
log.log({'error': 'Failure getting LLDP information from {}'.format(smmaddr)})
|
||||
return
|
||||
if not neighs:
|
||||
return
|
||||
for neigh in neighs:
|
||||
|
Loading…
Reference in New Issue
Block a user