Logger added at KeyError

This commit is contained in:
Domisiding 2023-04-12 17:58:28 +02:00
parent 95467063d5
commit 9b8bde9527

View File

@ -225,6 +225,7 @@ class NetworkDevice():
self.zbx_templates = self.config_context["zabbix"]["templates"]
except KeyError:
e = "Config context for Zabbix template was not found for host {self.name}"
logger.error(e)
else:
if(template_cf in device_type_cf):
self.template_name = device_type_cf[template_cf]