Fix KeyError: 'pvid' in lldp.py #223
1 changed files with 1 additions and 1 deletions
|
@ -37,7 +37,7 @@ class LLDP():
|
||||||
vid = value
|
vid = value
|
||||||
vlans[interface][value] = vlans[interface].get(vid, {})
|
vlans[interface][value] = vlans[interface].get(vid, {})
|
||||||
elif path.endswith('vlan'):
|
elif path.endswith('vlan'):
|
||||||
vid = value.replace('vlan-', '')
|
vid = value.replace('vlan-', '').replace('VLAN', '')
|
||||||
vlans[interface][vid] = vlans[interface].get(vid, {})
|
vlans[interface][vid] = vlans[interface].get(vid, {})
|
||||||
elif 'pvid' in path:
|
elif 'pvid' in path:
|
||||||
vlans[interface][vid]['pvid'] = True
|
vlans[interface][vid]['pvid'] = True
|
||||||
|
|
Loading…
Reference in a new issue