summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2023-01-21 09:22:53 +0100
committerChristian Breunig <christian@breunig.cc>2023-01-21 09:22:53 +0100
commit1e2238e3870309f48506a25c730661936b09a9d1 (patch)
tree3d4c27610328c495f4c27a5319dcc107c41dce8e
parenta55dcaee83b0966bc9564e0a7996b6e1b4e922a6 (diff)
downloadvyos-1x-1e2238e3870309f48506a25c730661936b09a9d1.tar.gz
vyos-1x-1e2238e3870309f48506a25c730661936b09a9d1.zip
T4911: op-mode: bugfix TypeError: 'NoneType' object is not iterable
-rwxr-xr-xsrc/op_mode/lldp.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/op_mode/lldp.py b/src/op_mode/lldp.py
index c815ffcd4..bfcb8f8c7 100755
--- a/src/op_mode/lldp.py
+++ b/src/op_mode/lldp.py
@@ -61,6 +61,9 @@ def _get_raw_data(interface=None, detail=False):
def _get_formatted_output(raw_data):
data_entries = []
+ tmp = dict_search('lldp.interface', raw_data)
+ if not tmp:
+ return None
for neighbor in dict_search('lldp.interface', raw_data):
for local_if, values in neighbor.items():
tmp = []