summaryrefslogtreecommitdiff
path: root/src/op_mode/lldp_op.py
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2022-03-04 20:08:27 +0100
committerChristian Poessinger <christian@poessinger.com>2022-03-04 20:08:27 +0100
commitc06861440cd21ff7c668b35ed1039f5fac4101b9 (patch)
treeb759931232864869372b7416954380c72f1e8f4e /src/op_mode/lldp_op.py
parenta929d58f333c39272580a48b2fc467118105bbcf (diff)
downloadvyos-1x-c06861440cd21ff7c668b35ed1039f5fac4101b9.tar.gz
vyos-1x-c06861440cd21ff7c668b35ed1039f5fac4101b9.zip
op-mode: lldp: T3999: bugfix cap' referenced before assignment
Diffstat (limited to 'src/op_mode/lldp_op.py')
-rwxr-xr-xsrc/op_mode/lldp_op.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/op_mode/lldp_op.py b/src/op_mode/lldp_op.py
index b9ebc991a..17f6bf552 100755
--- a/src/op_mode/lldp_op.py
+++ b/src/op_mode/lldp_op.py
@@ -54,6 +54,7 @@ def parse_data(data, interface):
for local_if, values in neighbor.items():
if interface is not None and local_if != interface:
continue
+ cap = ''
for chassis, c_value in values.get('chassis', {}).items():
# bail out early if no capabilities found
if 'capability' not in c_value:
@@ -62,7 +63,6 @@ def parse_data(data, interface):
if isinstance(capabilities, dict):
capabilities = [capabilities]
- cap = ''
for capability in capabilities:
if capability['enabled']:
if capability['type'] == 'Router':