]> gitweb.michael.orlitzky.com - djbdns-logparse.git/blobdiff - djbdns/dnscache.py
djbdns/{dnscache,tinydns}.py: don't clobber the global compile().
[djbdns-logparse.git] / djbdns / dnscache.py
index 785121b65d0541d04005654ebf0c59a7a7144dd7..0d9de08592c903967ce988f355a798086661fd5d 100644 (file)
@@ -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):