From 0942cb75e6d2e73f81f48166053bf3bb1997cb91 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Wed, 21 Sep 2022 21:00:15 -0400 Subject: [PATCH] djbdns/dnscache.py: improve two comments. --- djbdns/dnscache.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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 = "..." -- 2.44.2