1
0
Fork 0
mirror of https://github.com/Luzifer/dns.git synced 2024-11-09 22:50:06 +00:00

Handle error in alias targets

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2018-02-06 22:59:54 +01:00
parent 5edadd507c
commit 1244d63733
Signed by: luzifer
GPG key ID: DC2729FDD34BE99E

View file

@ -55,7 +55,12 @@ def check_entry(zone_name, entry):
warn('Zone "{}" - Entry "{}" - Unexpected key in entry found: {}'.format(
zone_name, entry['name'], k))
parsed_entries = generator.sanitize(entry)
try:
parsed_entries = generator.sanitize(entry)
except:
error('Zone "{}" - Entry "{}" - Alias is not resolvable'.format(
zone_name, entry['name']))
return
if len(parsed_entries) == 0:
warn('Zone "{}" - Entry "{}" - Resolved to 0 resource records!'.format(