mirror of
https://github.com/TheNetworkGuy/netbox-zabbix-sync.git
synced 2026-03-21 12:08:39 -06:00
🐛 Updated script_dir path for new netbox_zabbix_sync parent folder
This commit is contained in:
@@ -114,9 +114,10 @@ def load_env_variable(config_environvar):
|
||||
|
||||
def load_config_file(config_default, config_file="config.py"):
|
||||
"""Returns config from config.py file"""
|
||||
# Find the script path and config file next to it.
|
||||
script_dir = path.dirname(path.dirname(path.abspath(__file__)))
|
||||
config_path = Path(path.join(script_dir, config_file))
|
||||
if not config_path or not config_path.exists():
|
||||
# Find the script path and config file next to it.
|
||||
script_dir = path.dirname(path.dirname(path.dirname(path.abspath(__file__))))
|
||||
config_path = Path(path.join(script_dir, config_file))
|
||||
|
||||
# If the script directory is not found, try the current working directory
|
||||
if not config_path.exists():
|
||||
|
||||
Reference in New Issue
Block a user