Handler should be after the functions it uses

This commit is contained in:
otthorn 2021-04-05 00:33:17 +02:00
parent 81204008a2
commit b4713ae750

28
main.py
View file

@ -45,21 +45,6 @@ def format_mname(name: str):
return mname return mname
HANDLERS = {
"soa": soa_handler,
"originv4": originv4_handler,
"originv6": originv6_handler,
"ns_records": ns_records_handler,
"sshfp": sshfp_handler,
"mx_records": mx_records_handler,
"txt_records": txt_records_handler,
"srv_records": srv_records_handler,
"a_records": a_records_handler,
"aaaa_records": aaaa_records_handler,
}
def soa_handler(zone, records): def soa_handler(zone, records):
"""Handler for SOA record""" """Handler for SOA record"""
@ -183,6 +168,19 @@ def a_records_handler(zone, recordds):
) )
) )
HANDLERS = {
"soa": soa_handler,
"originv4": originv4_handler,
"originv6": originv6_handler,
"ns_records": ns_records_handler,
"sshfp": sshfp_handler,
"mx_records": mx_records_handler,
"txt_records": txt_records_handler,
"srv_records": srv_records_handler,
"a_records": a_records_handler,
"aaaa_records": aaaa_records_handler,
}
parser = argparse.ArgumentParser() parser = argparse.ArgumentParser()