Merge pull request #291 from beardymcbeards/devel

lldp - Ignore lines that do not have the key in them
This commit is contained in:
Brian Coca 2015-03-07 23:07:29 -05:00
commit 229e5ad80f

View file

@ -54,7 +54,7 @@ def gather_lldp():
lldp_entries = output.split("\n") lldp_entries = output.split("\n")
for entry in lldp_entries: for entry in lldp_entries:
if entry: if entry.startswith('lldp'):
path, value = entry.strip().split("=", 1) path, value = entry.strip().split("=", 1)
path = path.split(".") path = path.split(".")
path_components, final = path[:-1], path[-1] path_components, final = path[:-1], path[-1]