]> git.ipfire.org Git - thirdparty/dnspython.git/commitdiff
MNT: use raw string literals for invalid escapes
authorThomas A Caswell <tcaswell@bnl.gov>
Wed, 30 Oct 2019 23:50:52 +0000 (19:50 -0400)
committerThomas A Caswell <tcaswell@bnl.gov>
Wed, 30 Oct 2019 23:50:52 +0000 (19:50 -0400)
dns/zone.py

index 1989d1a7f5d57515796ce077cdd39fea53968cd1..542ec7eaa638c0f8a76a763e0997f85e55aca4c8 100644 (file)
@@ -738,9 +738,9 @@ class _MasterReader(object):
     def _parse_modify(self, side):
         # Here we catch everything in '{' '}' in a group so we can replace it
         # with ''.
-        is_generate1 = re.compile("^.*\$({(\+|-?)(\d+),(\d+),(.)}).*$")
-        is_generate2 = re.compile("^.*\$({(\+|-?)(\d+)}).*$")
-        is_generate3 = re.compile("^.*\$({(\+|-?)(\d+),(\d+)}).*$")
+        is_generate1 = re.compile(r"^.*\$({(\+|-?)(\d+),(\d+),(.)}).*$")
+        is_generate2 = re.compile(r"^.*\$({(\+|-?)(\d+)}).*$")
+        is_generate3 = re.compile(r"^.*\$({(\+|-?)(\d+),(\d+)}).*$")
         # Sometimes there are modifiers in the hostname. These come after
         # the dollar sign. They are in the form: ${offset[,width[,base]]}.
         # Make names