mirror of
https://github.com/TheNetworkGuy/netbox-zabbix-sync.git
synced 2025-07-16 04:02:56 -06:00
tweaked exception handling
This commit is contained in:
parent
c006e7feb5
commit
634f4b77d5
@ -379,7 +379,7 @@ class NetworkDevice():
|
|||||||
e = (f"Custom field {template_cf} not "
|
e = (f"Custom field {template_cf} not "
|
||||||
f"found for {self.nb.device_type.manufacturer.name}"
|
f"found for {self.nb.device_type.manufacturer.name}"
|
||||||
f" - {self.nb.device_type.display}.")
|
f" - {self.nb.device_type.display}.")
|
||||||
raise TemplateError(e) from e
|
raise TemplateError(e)
|
||||||
|
|
||||||
def get_templates_context(self):
|
def get_templates_context(self):
|
||||||
""" Get Zabbix templates from the device context """
|
""" Get Zabbix templates from the device context """
|
||||||
@ -493,7 +493,7 @@ class NetworkDevice():
|
|||||||
e = (f"Unable to find template {nb_template} "
|
e = (f"Unable to find template {nb_template} "
|
||||||
f"for host {self.name} in Zabbix. Skipping host...")
|
f"for host {self.name} in Zabbix. Skipping host...")
|
||||||
logger.warning(e)
|
logger.warning(e)
|
||||||
raise SyncInventoryError(e) from e
|
raise SyncInventoryError(e)
|
||||||
|
|
||||||
def getZabbixGroup(self, groups):
|
def getZabbixGroup(self, groups):
|
||||||
"""
|
"""
|
||||||
|
Loading…
Reference in New Issue
Block a user