mirror of
https://github.com/TheNetworkGuy/netbox-zabbix-sync.git
synced 2025-07-13 15:24:48 -06:00
fixed undefined-variable
This commit is contained in:
parent
c684ac4a9d
commit
0d7c581ee2
@ -185,6 +185,9 @@ def main(arguments):
|
||||
class SyncError(Exception):
|
||||
""" Class SyncError """
|
||||
|
||||
class JournalError(Exception):
|
||||
""" Class SyncError """
|
||||
|
||||
class SyncExternalError(SyncError):
|
||||
""" Class SyncExternalError """
|
||||
|
||||
@ -759,7 +762,7 @@ class NetworkDevice():
|
||||
self.nb_journals.create(journal)
|
||||
logger.debug(f"Created journal entry in NB for host {self.name}")
|
||||
return True
|
||||
except pynetbox.RequestError as e:
|
||||
except JournalError(e) as e:
|
||||
logger.warning("Unable to create journal entry for "
|
||||
f"{self.name}: NB returned {e}")
|
||||
return False
|
||||
|
Loading…
Reference in New Issue
Block a user