X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=djbdns%2Fdnscache.py;fp=djbdns%2Fdnscache.py;h=0d9de08592c903967ce988f355a798086661fd5d;hb=d73740c3a7d3696aaf7f3d677f83654cbd4b3583;hp=785121b65d0541d04005654ebf0c59a7a7144dd7;hpb=d9f3e6ef07662990538a9a6fb46f8120ffc37ee5;p=djbdns-logparse.git diff --git a/djbdns/dnscache.py b/djbdns/dnscache.py index 785121b..0d9de08 100644 --- a/djbdns/dnscache.py +++ b/djbdns/dnscache.py @@ -1,9 +1,11 @@ -from re import compile +# Don't clobber the global compile() with a named import. +import re + from typing import Optional from djbdns.common import * # The regex to match dnscache log lines. -dnscache_log_re = compile(fr'({timestamp_pat}) (\w+)(.*)') +dnscache_log_re = re.compile(fr'({timestamp_pat}) (\w+)(.*)') def decode_client(words : list, i : int):