From: Michael Orlitzky Date: Thu, 22 Sep 2022 01:00:15 +0000 (-0400) Subject: djbdns/dnscache.py: improve two comments. X-Git-Tag: 0.0.1~13 X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=0942cb75e6d2e73f81f48166053bf3bb1997cb91;p=djbdns-logparse.git djbdns/dnscache.py: improve two comments. --- diff --git a/djbdns/dnscache.py b/djbdns/dnscache.py index a7fc56d..785121b 100644 --- a/djbdns/dnscache.py +++ b/djbdns/dnscache.py @@ -287,9 +287,11 @@ def handle_dnscache_log(line : str) -> Optional[str]: decode_ttl(words, 1) if words[2] not in ("cname", "mx", "ns", "ptr", "soa"): decode_type(words, 2) - if words[2] == "a": # decode answer to an A query + if words[2] == "a": + # Decode the response to an 'A' query decode_ip(words, 4) - if words[2] == "txt": # text record + if words[2] == "txt": + # Decode the TXT record's data from hex to ASCII. response = words[4] if response.endswith("..."): ellipsis = "..."