mirror of
https://github.com/isc-projects/bind9.git
synced 2026-05-27 12:13:20 -04:00
Special-case zone in-view
It is not really a zone type, so let's not generate "type in-view"
anchor for it.
(cherry picked from commit 261bdc7358)
This commit is contained in:
parent
e55682f6f7
commit
07cfcf8691
2 changed files with 10 additions and 3 deletions
|
|
@ -145,8 +145,11 @@ def domain_factory(domainname, domainlabel, todolist, grammar):
|
|||
try:
|
||||
zone_idx = path.index("zone")
|
||||
zone_type_txt = path[zone_idx + 1]
|
||||
assert zone_type_txt.startswith("type "), zone_type_txt
|
||||
zone_types.add(zone_type_txt[len("type ") :])
|
||||
if zone_type_txt.startswith("type "):
|
||||
zone_types.add(zone_type_txt[len("type ") :])
|
||||
else:
|
||||
assert zone_type_txt == "in-view"
|
||||
zone_types.add(zone_type_txt)
|
||||
except (ValueError, IndexError):
|
||||
nozone_paths.append(path)
|
||||
condensed_paths = nozone_paths[:]
|
||||
|
|
|
|||
|
|
@ -22,7 +22,11 @@ import parsegrammar
|
|||
def read_zone():
|
||||
zone_grammars = {}
|
||||
for file in Path("../misc/").glob("*.zoneopt"):
|
||||
zone_type = f"type {file.stem}"
|
||||
# in-view is not really a zone type
|
||||
if file.stem == "in-view":
|
||||
zone_type = "in-view"
|
||||
else:
|
||||
zone_type = f"type {file.stem}"
|
||||
|
||||
with file.open(encoding="ascii") as fp:
|
||||
zonegrammar = parsegrammar.parse_mapbody(fp)
|
||||
|
|
|
|||
Loading…
Reference in a new issue