]> gitweb.michael.orlitzky.com - djbdns-logparse.git/blobdiff - djbdns/dnscache.py
djbdns/*.py: don't clobber id() and type() built-ins.
[djbdns-logparse.git] / djbdns / dnscache.py
index 0d9de08592c903967ce988f355a798086661fd5d..7fed987195c3d39b466512a57258f6b28411d818 100644 (file)
@@ -59,8 +59,8 @@ def decode_client(words : list, i : int):
 
     if len(chunks) == 3:
         # For a "query" entry's clientip:clientport:id field.
-        id = int(chunks[2], 16)
-        words[i] += f" (id {id})"
+        packet_id = int(chunks[2], 16)
+        words[i] += f" (id {packet_id})"
 
 def decode_ip(words : list, i : int):
     r"""
@@ -207,7 +207,7 @@ def decode_type(words : list, i : int):
 
     """
     qt = words[i]
-    words[i] = query_type.get(int(qt), qt)
+    words[i] = query_type_name.get(int(qt), qt)
 
 def handle_dnscache_log(line : str) -> Optional[str]:
     r"""