blob: 0c081674b1f7e379232f405fe6e6037ed695ac60 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
def parse_dns_record(record: dict) -> dict:
"""
Parse the DNS record.
Replace the ttl and prio string values with the int values.
:param record: the unparsed DNS record dict
:return: the parsed dns record dict
"""
if record.get("ttl", None) is not None:
record["ttl"] = int(record["ttl"])
if record.get("prio", None) is not None:
record["prio"] = int(record["prio"])
return record
|