mirror of
https://github.com/TheNetworkGuy/netbox-zabbix-sync.git
synced 2025-07-13 07:24:47 -06:00
Fixed config bug and #111
This commit is contained in:
parent
7b8827fa94
commit
c8fda04ce8
@ -118,7 +118,4 @@ def load_config_file(config_default, config_file="config.py"):
|
||||
if hasattr(config_module, key):
|
||||
dconf[key] = getattr(config_module, key)
|
||||
return dconf
|
||||
logger.warning(
|
||||
"Config file %s not found. Using default config "
|
||||
"and environment variables.", config_file)
|
||||
return None
|
||||
return config_default
|
@ -8,10 +8,10 @@ from logging import getLogger
|
||||
from re import search
|
||||
|
||||
from zabbix_utils import APIRequestError
|
||||
from pynetbox import RequestError as NetboxRequestError
|
||||
|
||||
from modules.exceptions import (
|
||||
InterfaceConfigError,
|
||||
JournalError,
|
||||
SyncExternalError,
|
||||
SyncInventoryError,
|
||||
TemplateError,
|
||||
@ -896,7 +896,7 @@ class PhysicalDevice:
|
||||
self.nb_journals.create(journal)
|
||||
self.logger.debug(f"Host {self.name}: Created journal entry in NetBox")
|
||||
return True
|
||||
except JournalError(e) as e:
|
||||
except NetboxRequestError as e:
|
||||
self.logger.warning(
|
||||
"Unable to create journal entry for "
|
||||
f"{self.name}: NB returned {e}"
|
||||
|
Loading…
Reference in New Issue
Block a user