6 Commits

Author SHA1 Message Date
Twan Kamans
da17b7be7d Merge pull request #173 from TheNetworkGuy/develop
Build and Push Docker Image / test_quality (push) Failing after 1m5s
Build and Push Docker Image / test_code (push) Failing after 1m14s
Build and Push Docker Image / build (push) Failing after 2m47s
Package code to main
2026-02-27 16:44:01 +01:00
Twan Kamans
4b54d93c6f Merge pull request #172 from TheNetworkGuy/bug/config-file-path
🐛 Adjusting reading of config.py behavior to support legacy usage
2026-02-27 15:47:16 +01:00
Wouter de Bruijn
8073cae46a 🔥 Removed special case option because of unlikely scenario 2026-02-27 15:36:39 +01:00
Wouter de Bruijn
9da113ac60 🚧 Added check for reading config file from netbox-zabbix-sync.py as root dir 2026-02-27 13:43:56 +01:00
Wouter de Bruijn
473dd1dcc1 🐛 Updated script_dir path for new netbox_zabbix_sync parent folder 2026-02-27 13:43:18 +01:00
Wouter de Bruijn
14e68c34ea 🐛 Changed end of line to LF 2026-02-27 13:42:31 +01:00
2 changed files with 8 additions and 7 deletions
+2 -1
View File
@@ -114,8 +114,9 @@ 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__)))
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