]> gitweb.michael.orlitzky.com - djbdns-logparse.git/commitdiff
bin/djbdns-logparse.py: fix python3 integer division for txt records.
authorMichael Orlitzky <michael@orlitzky.com>
Thu, 15 Sep 2022 23:49:21 +0000 (19:49 -0400)
committerMichael Orlitzky <michael@orlitzky.com>
Thu, 15 Sep 2022 23:49:21 +0000 (19:49 -0400)
bin/djbdns-logparse.py

index 709de6072e6dfcb699bd6c0ed6ef1bafe989f4e8..8aa1837c3fce6f901408f73f278919666c40c105 100755 (executable)
@@ -219,7 +219,7 @@ def handle_dnscache_log(line) -> typing.Optional[str]:
                     ellipsis = ""
                 length = int(response[0:2], 16)
                 chars = []
-                for i in range(1, len(response)/2):
+                for i in range(1, len(response)//2):
                     chars.append(chr(int(response[2*i : (2*i)+2], 16)))
                 words[4] = "%d:\"%s%s\"" % (length, "".join(chars), ellipsis)