fixup! Fix KeyError: 'pvid' in lldp.py
This commit is contained in:
parent
a59fb446f3
commit
5346e0fdf9
3 changed files with 18 additions and 1 deletions
|
|
@ -245,7 +245,7 @@ class Network(object):
|
|||
interface.untagged_vlan = None
|
||||
# Finally if LLDP reports a vlan-id with the pvid attribute
|
||||
elif lldp_vlan:
|
||||
pvid_vlan = [key for (key, value) in lldp_vlan.items() if value['pvid']]
|
||||
pvid_vlan = [key for (key, value) in lldp_vlan.items() if value.get('pvid')]
|
||||
if len(pvid_vlan) > 0 and (
|
||||
interface.mode is None or
|
||||
interface.mode.value != self.dcim_choices['interface:mode']['Access'] or
|
||||
|
|
|
|||
Loading…
Add table
editor.link_modal.header
Reference in a new issue