diff --git a/modules/device.py b/modules/device.py index cbc03ec..ee54891 100644 --- a/modules/device.py +++ b/modules/device.py @@ -145,12 +145,12 @@ class PhysicalDevice(): def get_templates_context(self): """ Get Zabbix templates from the device context """ if "zabbix" not in self.config_context: - e = ("Key 'zabbix' not found in config " - f"context for template host {self.name}") + e = (f"Host {self.name}: Key 'zabbix' not found in config " + "context for template") raise TemplateError(e) if "templates" not in self.config_context["zabbix"]: - e = ("Key 'templates' not found in config " - f"context 'zabbix' for template host {self.name}") + e = (f"Host {self.name}: Key 'templates' not found in config " + "context 'zabbix' for template host") raise TemplateError(e) return self.config_context["zabbix"]["templates"] diff --git a/modules/virtual_machine.py b/modules/virtual_machine.py index 8bbcd63..788a903 100644 --- a/modules/virtual_machine.py +++ b/modules/virtual_machine.py @@ -3,7 +3,6 @@ """Module that hosts all functions for virtual machine processing""" from os import sys -from logging import getLogger from modules.device import PhysicalDevice from modules.hostgroups import Hostgroup from modules.interface import ZabbixInterface