X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=djbdns%2Ftinydns.py;h=9635360e1472f419c79e10d86c805be8a59dd3d1;hb=19ec8900bbe23758c4ab2b731f4f6c3207c03ad3;hp=0b60a512983e29992482aa45bb9d577a5a772589;hpb=36a54466cf29666e492b48c4308d159d5cfcb11a;p=djbdns-logparse.git diff --git a/djbdns/tinydns.py b/djbdns/tinydns.py index 0b60a51..9635360 100644 --- a/djbdns/tinydns.py +++ b/djbdns/tinydns.py @@ -74,10 +74,9 @@ def handle_tinydns_log(line : str) -> Optional[str]: request_id = int(request_id, 16) # Convert the "type" field to a human-readable record type name - # using the query_type dictionary. If the right name isn't present - # in the dictionary, we use the (decimal) type id instead. - query_type = int(query_type, 16) # "001c" -> 28 - query_type = QUERY_TYPE_NAME.get(query_type, type) # 28 -> "aaaa" + # using the query_type dictionary. + query_type = int(query_type, 16) # "001c" -> 28 + query_type = QUERY_TYPE_NAME.get(query_type) # 28 -> "aaaa" line_tpl = "{timestamp} "