Without this change many unit tests are failing on systems with
Python 3.12:

  +++ /tests/testsuite.dir/at-groups/2352/stdout
  @@ -1,3 +1,5 @@
  +/./interface-reconfigure:98: SyntaxWarning: invalid escape sequence '\s'
  +  p = re.compile(".*\s%(MAC)s\s.*" % pifrec, re.IGNORECASE)

Converting to a raw string to avoid the issue.

This only affects OVS 2.17, support for XenServer was removed
in OVS 3.0.

Signed-off-by: Ilya Maximets <[email protected]>
---
 xenserver/opt_xensource_libexec_interface-reconfigure | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xenserver/opt_xensource_libexec_interface-reconfigure 
b/xenserver/opt_xensource_libexec_interface-reconfigure
index 9c20725de..49d208296 100755
--- a/xenserver/opt_xensource_libexec_interface-reconfigure
+++ b/xenserver/opt_xensource_libexec_interface-reconfigure
@@ -95,7 +95,7 @@ def check_allowed(pif):
         macline = filter(lambda x: x.startswith("HWaddr:"), f.readlines())
         f.close()
         if len(macline) == 1:
-            p = re.compile(".*\s%(MAC)s\s.*" % pifrec, re.IGNORECASE)
+            p = re.compile(r".*\s%(MAC)s\s.*" % pifrec, re.IGNORECASE)
             if p.match(macline[0]):
                 log("Skipping PVS device %(device)s (%(MAC)s)" % pifrec)
                 return False
-- 
2.44.0

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to