From: Michael Orlitzky Date: Thu, 15 Sep 2022 23:49:21 +0000 (-0400) Subject: bin/djbdns-logparse.py: fix python3 integer division for txt records. X-Git-Tag: 0.0.1~39 X-Git-Url: http://gitweb.michael.orlitzky.com/?p=djbdns-logparse.git;a=commitdiff_plain;h=af51e4b85a27ba1b263e8371e1efeea93e90842b bin/djbdns-logparse.py: fix python3 integer division for txt records. --- diff --git a/bin/djbdns-logparse.py b/bin/djbdns-logparse.py index 709de60..8aa1837 100755 --- a/bin/djbdns-logparse.py +++ b/bin/djbdns-logparse.py @@ -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)