]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
python:tests: Fix invalid escape sequences
authorJoseph Sutton <josephsutton@catalyst.net.nz>
Sun, 10 Sep 2023 23:59:34 +0000 (11:59 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 27 Sep 2023 02:43:28 +0000 (02:43 +0000)
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
python/samba/tests/dns_forwarder_helpers/server.py
python/samba/tests/samba_tool/user_virtualCryptSHA.py
python/samba/tests/samba_tool/user_virtualCryptSHA_base.py

index f6feb0bb690702c53e700907db21404ec403b8b8..c4c82dc5121ec64f2c3536b68f6c743d19bef72f 100644 (file)
@@ -77,7 +77,7 @@ class DnsHandler(SocketServer.BaseRequestHandler):
         debug("%s: %s wrote:" % (SERVER_ID, self.client_address[0]))
 
         global timeout
-        m = re.match(b'^timeout\s+([\d.]+)$', data.strip())
+        m = re.match(br'^timeout\s+([\d.]+)$', data.strip())
         if m:
             timeout = float(m.group(1))
             debug("timing out at %s" % timeout)
index 4efa9a62a3961c35bfd559b4b998dea84d3f50d2..7b8e0cea2c55adab726ee1c5de18c5373d92c5c4 100644 (file)
@@ -39,7 +39,7 @@ HASH_OPTION = "password hash userPassword schemes"
 
 
 def _get_attribute(out, name):
-    p = re.compile("^" + name + ":\s+(\S+)")
+    p = re.compile("^" + name + r":\s+(\S+)")
     for line in out.split("\n"):
         m = p.match(line)
         if m:
index e32f8d7343cd21185fd68790e73ba47b4e5970a7..d4897ec5a523da497af04df310a0aa63da116d63 100644 (file)
@@ -39,7 +39,7 @@ HASH_OPTION = "password hash userPassword schemes"
 
 
 def _get_attribute(out, name):
-    p = re.compile("^" + name + ":\s+(\S+)")
+    p = re.compile("^" + name + r":\s+(\S+)")
     for line in out.split("\n"):
         m = p.match(line)
         if m: