mirror of
https://github.com/TheNetworkGuy/netbox-zabbix-sync.git
synced 2025-07-13 15:24:48 -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 "
|
||||
f"found for {self.nb.device_type.manufacturer.name}"
|
||||
f" - {self.nb.device_type.display}.")
|
||||
raise TemplateError(e) from e
|
||||
raise TemplateError(e)
|
||||
|
||||
def get_templates_context(self):
|
||||
""" Get Zabbix templates from the device context """
|
||||
@ -493,7 +493,7 @@ class NetworkDevice():
|
||||
e = (f"Unable to find template {nb_template} "
|
||||
f"for host {self.name} in Zabbix. Skipping host...")
|
||||
logger.warning(e)
|
||||
raise SyncInventoryError(e) from e
|
||||
raise SyncInventoryError(e)
|
||||
|
||||
def getZabbixGroup(self, groups):
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user