mirror of
https://github.com/TheNetworkGuy/netbox-zabbix-sync.git
synced 2025-12-18 19:32:22 -06:00
🚨 Improvement for variable assignment in logging
This commit is contained in:
@@ -890,16 +890,15 @@ class PhysicalDevice:
|
||||
raise SyncExternalError(msg) from e
|
||||
else:
|
||||
# If no updates are found, Zabbix interface is in-sync
|
||||
e = f"Host {self.name}: interface in-sync."
|
||||
self.logger.debug(e)
|
||||
self.logger.debug("Host %s: interface in-sync.", self.name)
|
||||
else:
|
||||
e = (
|
||||
error_message = (
|
||||
f"Host {self.name} has unsupported interface configuration."
|
||||
f" Host has total of {len(host['interfaces'])} interfaces. "
|
||||
"Manual intervention required."
|
||||
)
|
||||
self.logger.error(e)
|
||||
raise SyncInventoryError(e)
|
||||
self.logger.error(error_message)
|
||||
raise SyncInventoryError(error_message)
|
||||
|
||||
def create_journal_entry(self, severity, message):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user