]> gitweb.michael.orlitzky.com - djbdns-logparse.git/blobdiff - djbdns/tinydns.py
djbdns/*.py: add all remaining mappings to QUERY_TYPE_NAME.
[djbdns-logparse.git] / djbdns / tinydns.py
index 0b60a512983e29992482aa45bb9d577a5a772589..9635360e1472f419c79e10d86c805be8a59dd3d1 100644 (file)
@@ -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} "