]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
samba-tool: Don't use invalid escape sequences
authorJoseph Sutton <josephsutton@catalyst.net.nz>
Fri, 24 Feb 2023 01:54:02 +0000 (14:54 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Fri, 3 Mar 2023 01:07:36 +0000 (01:07 +0000)
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
python/samba/netcmd/gpo.py

index 9b00a9016c3c351f750c1845425fa9a1cbcf1646..2f882cbf51cc5c198fee7fdc727326ff7eae01c4 100644 (file)
@@ -1651,7 +1651,7 @@ class cmd_restore(cmd_create):
                 entities_content = entities_file.read()
 
                 # Do a basic regex test of the entities file format
-                if re.match('(\s*<!ENTITY\s*[a-zA-Z0-9_]+\s*.*?>)+\s*\Z',
+                if re.match(r'(\s*<!ENTITY\s*[a-zA-Z0-9_]+\s*.*?>)+\s*\Z',
                             entities_content, flags=re.MULTILINE) is None:
                     raise CommandError("Entities file does not appear to "
                                        "conform to format\n"