mirror of
https://github.com/TheNetworkGuy/netbox-zabbix-sync.git
synced 2025-12-18 11:22:22 -06:00
Added basic error message when Netbox details are invalid. Fixed logging message for when template context keys are not present.
This commit is contained in:
@@ -146,11 +146,11 @@ class PhysicalDevice():
|
||||
""" Get Zabbix templates from the device context """
|
||||
if "zabbix" not in self.config_context:
|
||||
e = (f"Host {self.name}: Key 'zabbix' not found in config "
|
||||
"context for template")
|
||||
"context for template lookup")
|
||||
raise TemplateError(e)
|
||||
if "templates" not in self.config_context["zabbix"]:
|
||||
e = (f"Host {self.name}: Key 'templates' not found in config "
|
||||
"context 'zabbix' for template host")
|
||||
"context 'zabbix' for template lookup")
|
||||
raise TemplateError(e)
|
||||
return self.config_context["zabbix"]["templates"]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user