Escape zone names
Support zones containing slashes in their name by urlencoding the zone name added to the API URL. Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
This commit is contained in:
parent
3f818e8ccb
commit
1487cfdd70
@ -45,7 +45,9 @@ def _get(path):
|
|||||||
def _iterate_zone(zone, types, only_records=False):
|
def _iterate_zone(zone, types, only_records=False):
|
||||||
result = {}
|
result = {}
|
||||||
records = []
|
records = []
|
||||||
this_zone = _get(f'zones/{zone}')
|
|
||||||
|
escapedzone = requests.utils.quote(zone, safe='')
|
||||||
|
this_zone = _get(f'zones/{escapedzone}')
|
||||||
|
|
||||||
for rrset in this_zone['rrsets']:
|
for rrset in this_zone['rrsets']:
|
||||||
if rrset['type'] in types:
|
if rrset['type'] in types:
|
||||||
|
Loading…
Reference in New Issue
Block a user