Solvik / netbox-agent

Netbox agent to run on your infrastructure's servers
Apache License 2.0
287 stars 74 forks source link

fix lldp.py #280

Closed Zagrebelsky closed 1 year ago

Zagrebelsky commented 1 year ago

It's fix for issue https://github.com/Solvik/netbox-agent/issues/274

Issue

There might be an issue when the path_component is already a string in the dictionary. When this happens, current_dict becomes a string, and then current_dict[final] = value, it throws the TypeError.

Expected behavior

current_dict should always be dict, and not failed

Test environment:

OS: [e.g. Rocky 8 18.04] Netbox agent version [v0.7.2]