mirror of
https://github.com/Luzifer/dns.git
synced 2024-12-22 19:01:20 +00:00
Add capability for subfolders
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
ea6ad1f1be
commit
50b518bc8b
1 changed files with 2 additions and 2 deletions
|
@ -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 consists of at least 2 elements: dns/ahlers.me/subdomain OR dns/ahlers.me
|
||||||
key = raw_entry['Key'].split('/')[2:]
|
key = raw_entry['Key'].split('/')[2:]
|
||||||
name = ''
|
name = ''
|
||||||
if len(key) > 0 and key[0] != '@':
|
if key not in [[], ['@']]:
|
||||||
name = key[0]
|
name = '.'.join(reversed(key))
|
||||||
|
|
||||||
for entry in sub_entries:
|
for entry in sub_entries:
|
||||||
entry['name'] = name
|
entry['name'] = name
|
||||||
|
|
Loading…
Reference in a new issue