Improves error detection

This commit is contained in:
Pierre Lannoy 2024-03-12 09:15:46 +01:00
commit 4e4a67e0bd
Signed by: Pierre Lannoy
GPG key ID: D27231EF87D53F31

View file

@ -66,7 +66,7 @@ class LLDP():
def get_switch_vlan(self, interface):
# lldp.eth0.vlan.vlan-id=296
logging.info(interface)
return None
if self.data['lldp'].get(interface) is None:
return None
return self.data['lldp'][interface]['vlan']