1
0
Fork 0
mirror of https://github.com/Luzifer/dns.git synced 2024-12-22 10:51:20 +00:00

Add capability for subfolders

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2018-12-17 18:08:20 +01:00
parent ea6ad1f1be
commit 50b518bc8b
Signed by: luzifer
GPG key ID: DC2729FDD34BE99E

View file

@ -64,8 +64,8 @@ def parse_raw_consul(zone):
# Key consists of at least 2 elements: dns/ahlers.me/subdomain OR dns/ahlers.me
key = raw_entry['Key'].split('/')[2:]
name = ''
if len(key) > 0 and key[0] != '@':
name = key[0]
if key not in [[], ['@']]:
name = '.'.join(reversed(key))
for entry in sub_entries:
entry['name'] = name