MCPcopy Create free account
hub / github.com/adobe/Marinus / get_lookup_int

Function get_lookup_int

python3_cron_scripts/remove_expired_entries.py:100–118  ·  view source on GitHub ↗

Get the DNS Type integer for the Google DNS query

(logger, result, GDNS)

Source from the content-addressed store, hash-verified

98
99
100def get_lookup_int(logger, result, GDNS):
101 """
102 Get the DNS Type integer for the Google DNS query
103 """
104 if result["type"].startswith("unk_in_"):
105 # Sonar didn't know what it was.
106
107 new_type = fix_unk_types(logger, result["type"], GDNS)
108 if new_type.startswith("unk_in"):
109 # Marinus doesn't know what it is either.
110 lookup_int = get_int_for_unk_type(result["type"])
111 else:
112 # Marinus was able to translate it.
113 lookup_int = GDNS.DNS_TYPES[new_type]
114 else:
115 # Normal type
116 lookup_int = GDNS.DNS_TYPES[result["type"]]
117
118 return lookup_int
119
120
121def insert_current_results(logger, dns_result, dns_manager, result, source):

Callers 1

mainFunction · 0.85

Calls 2

fix_unk_typesFunction · 0.85
get_int_for_unk_typeFunction · 0.85

Tested by

no test coverage detected