Skip to content

Commit

Permalink
simplify file-naming
Browse files Browse the repository at this point in the history
  • Loading branch information
superstes committed Dec 19, 2024
1 parent 53db461 commit 0217dd8
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions lib/dns.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,11 @@
PROCESS_IPv6 = True

# paths are set in util (shared between addons)
CONFIG_FILE = 'dns.json'
CONFIG_FILE_KEY = 'dns'
OUT_FILE = 'dns.nft'

CONFIG = load_config(file=CONFIG_FILE, key=CONFIG_FILE_KEY)
KEY = 'dns'
CONFIG = load_config(KEY)

if CONFIG is None or len(CONFIG) == 0:
raise SystemExit(f"Config file could not be loaded: '{CONFIG_FILE}'!")
raise SystemExit('DNS Config-file could not be loaded!')

lines = []
for var, hostnames in CONFIG.items():
Expand Down Expand Up @@ -50,4 +47,4 @@
)
)

validate_and_write(lines=lines, file=OUT_FILE, key=CONFIG_FILE_KEY)
validate_and_write(lines=lines, key=KEY)

0 comments on commit 0217dd8

Please sign in to comment.