Check and format TXT-data
This commit is contained in:
parent
aa777a3e61
commit
80ae6c7760
1 changed files with 7 additions and 1 deletions
8
lib.py
8
lib.py
|
@ -238,10 +238,16 @@ def txt_records_handler(re2o_zone, dns_zone):
|
||||||
else:
|
else:
|
||||||
name_obj = format_re2o_domain(name)
|
name_obj = format_re2o_domain(name)
|
||||||
|
|
||||||
|
txt_data = record["field2"]
|
||||||
|
|
||||||
|
if txt_data[0] == '"' and txt_data[-1] == '"':
|
||||||
|
txt_data = txt_data[1:-1]
|
||||||
|
logging.debug(f"TXT-DATA = {txt_data}")
|
||||||
|
|
||||||
TXT_obj = TXT.TXT(
|
TXT_obj = TXT.TXT(
|
||||||
dns.rdataclass.IN,
|
dns.rdataclass.IN,
|
||||||
dns.rdatatype.TXT,
|
dns.rdatatype.TXT,
|
||||||
record["field2"]
|
txt_data
|
||||||
)
|
)
|
||||||
|
|
||||||
add_to_zone(dns_zone, name_obj, TXT_obj)
|
add_to_zone(dns_zone, name_obj, TXT_obj)
|
||||||
|
|
Loading…
Reference in a new issue