Development
This commit is contained in:
parent
eae133f18e
commit
66be049f14
2 changed files with 11 additions and 11 deletions
|
|
@ -225,18 +225,10 @@ def update_blocklist_hosts(data):
|
|||
db = _open_db()
|
||||
bl_library = {bl["name"]: bl for bl in data.get("dns_blocking", {}).get("blocklists", [])}
|
||||
|
||||
needed = set()
|
||||
for vlan in data.get("vlans", []):
|
||||
needed.update(vlan.get("use_blocklists", []))
|
||||
|
||||
changed = set()
|
||||
any_fail = False
|
||||
|
||||
for name in needed:
|
||||
if name not in bl_library:
|
||||
_log.warning(f"Blocklist '{name}' referenced by a VLAN but not defined -- skipping")
|
||||
continue
|
||||
entry = bl_library[name]
|
||||
for name, entry in bl_library.items():
|
||||
is_local = entry.get("bl_type") == "local"
|
||||
save_as = entry.get("save_as", "")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue