Improves error detection

This commit is contained in:
Pierre Lannoy 2024-03-12 09:08:53 +01:00
commit 0c795a53dd
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
if self.data['lldp'] is None:
if self.data is None:
return None
if self.data['lldp'].get(interface) is None:
return None