summaryrefslogtreecommitdiff
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:42 +0100
commit81f61d39f6befbd15f38766cb11e5c99fc0ac37c (patch)
treed6b109f1d814a7f907d9569d4cde04247eaf9a24
parentbdd5fe45dc8eb2466889cd7bc2b4c6a5ce290dde (diff)
downloadvyos-1x-81f61d39f6befbd15f38766cb11e5c99fc0ac37c.tar.gz
vyos-1x-81f61d39f6befbd15f38766cb11e5c99fc0ac37c.zip
op-mode: lldp: T3999: bugfix cap' referenced before assignment
(cherry picked from commit c06861440cd21ff7c668b35ed1039f5fac4101b9)
-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':