mirror of
https://github.com/TheNetworkGuy/netbox-zabbix-sync.git
synced 2025-07-16 04:02:56 -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(Exception):
|
||||||
""" Class SyncError """
|
""" Class SyncError """
|
||||||
|
|
||||||
|
class JournalError(Exception):
|
||||||
|
""" Class SyncError """
|
||||||
|
|
||||||
class SyncExternalError(SyncError):
|
class SyncExternalError(SyncError):
|
||||||
""" Class SyncExternalError """
|
""" Class SyncExternalError """
|
||||||
|
|
||||||
@ -759,7 +762,7 @@ class NetworkDevice():
|
|||||||
self.nb_journals.create(journal)
|
self.nb_journals.create(journal)
|
||||||
logger.debug(f"Created journal entry in NB for host {self.name}")
|
logger.debug(f"Created journal entry in NB for host {self.name}")
|
||||||
return True
|
return True
|
||||||
except pynetbox.RequestError as e:
|
except JournalError(e) as e:
|
||||||
logger.warning("Unable to create journal entry for "
|
logger.warning("Unable to create journal entry for "
|
||||||
f"{self.name}: NB returned {e}")
|
f"{self.name}: NB returned {e}")
|
||||||
return False
|
return False
|
||||||
|
Loading…
Reference in New Issue
Block a user