Handler should be after the functions it uses
This commit is contained in:
parent
81204008a2
commit
b4713ae750
1 changed files with 13 additions and 15 deletions
28
main.py
28
main.py
|
@ -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()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue