✏️ fix typos

This commit is contained in:
otthorn 2021-04-04 20:46:12 +02:00
parent f30794f635
commit ef364d1662

14
main.py
View file

@ -33,7 +33,7 @@ def format_mname(name: str):
Format a zone name given by the re2o API to a mname dnspython object. Format a zone name given by the re2o API to a mname dnspython object.
Given a a name of the format `.zone.domain.tld` output the Given a a name of the format `.zone.domain.tld` output the
`.zone.domain.tld.`, formatted accordingly to the RFC 1035. `zone.domain.tld.`, formatted accordingly to the RFC 1035.
Return a `dns.name.name` object. Return a `dns.name.name` object.
""" """
@ -58,7 +58,9 @@ HANDLERS = {
"aaaa_records": aaaa_records_handler, "aaaa_records": aaaa_records_handler,
} }
def soa_hanlder((zone, records): def soa_handler(zone, records):
"""Handler for SOA record"""
soa = zone['soa'] soa = zone['soa']
records['@'].append( records['@'].append(
@ -131,7 +133,7 @@ def sshfp_record_handler(zone, records):
records[record["hostname"]].append( records[record["hostname"]].append(
dns.rdtype.ANY.SSHFP.SSHFP( dns.rdtype.ANY.SSHFP.SSHFP(
dns.rdataclass.IN, dns.rdataclass.IN,
dns.rdatatype.AAAA, dns.rdatatype.SSHFP,
algorithm, algorithm,
fp_type, fp_type,
fingerprint fingerprint
@ -143,12 +145,12 @@ def txt_records_handler(zone, records):
for record in zone["txt_records"]: for record in zone["txt_records"]:
zone_name = record["field1"] name = record["field1"]
records[zone_name].append( records[name].append(
dns.rdtypes.ANY.TXT.TXT( dns.rdtypes.ANY.TXT.TXT(
dns.rdataclass.IN, dns.rdataclass.IN,
dns.rdatatype.AAAA, dns.rdatatype.TXT,
record["field2"] record["field2"]
) )