summaryrefslogtreecommitdiff
path: root/src/op_mode/lldp_op.py
diff options
context:
space:
mode:
authorerkin <e.altunbas@vyos.io>2021-12-16 17:31:57 +0300
committererkin <e.altunbas@vyos.io>2021-12-16 17:31:57 +0300
commit95b91627a6065b720365c9ae7d124d85fc8e493d (patch)
tree1d743211400347d3847623fb0e17dd39dbfb604c /src/op_mode/lldp_op.py
parentdc8c230ad45a10be93fc2cd79c38ebb39fd0a148 (diff)
parent5a871f0dac024c7c0c59f1a1709543c4cc5e4f96 (diff)
downloadvyos-1x-95b91627a6065b720365c9ae7d124d85fc8e493d.tar.gz
vyos-1x-95b91627a6065b720365c9ae7d124d85fc8e493d.zip
Merge branch 'current' of https://github.com/erkin/vyos-1x into current
Diffstat (limited to 'src/op_mode/lldp_op.py')
-rwxr-xr-xsrc/op_mode/lldp_op.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/op_mode/lldp_op.py b/src/op_mode/lldp_op.py
index 731e71891..b9ebc991a 100755
--- a/src/op_mode/lldp_op.py
+++ b/src/op_mode/lldp_op.py
@@ -55,6 +55,9 @@ def parse_data(data, interface):
if interface is not None and local_if != interface:
continue
for chassis, c_value in values.get('chassis', {}).items():
+ # bail out early if no capabilities found
+ if 'capability' not in c_value:
+ continue
capabilities = c_value['capability']
if isinstance(capabilities, dict):
capabilities = [capabilities]