fix lldp.py (#280)
Co-authored-by: kszd487 <kszd487@ukc02dd0ylp3ywui.lan>
This commit is contained in:
parent
7ab7bbb9e1
commit
ba4cdb217b
1 changed files with 3 additions and 2 deletions
|
@ -31,8 +31,9 @@ class LLDP():
|
|||
vlans[interface] = {}
|
||||
|
||||
for path_component in path_components:
|
||||
current_dict[path_component] = current_dict.get(path_component, {})
|
||||
current_dict = current_dict[path_component]
|
||||
if not isinstance(current_dict.get(path_component), dict):
|
||||
current_dict[path_component] = {}
|
||||
current_dict = current_dict.get(path_component)
|
||||
if 'vlan-id' in path:
|
||||
vid = value
|
||||
vlans[interface][value] = vlans[interface].get(vid, {})
|
||||
|
|
Loading…
Reference in a new issue