Skip to content
Commit 3fde60af authored by Adrian Moreno's avatar Adrian Moreno Committed by Jakub Kicinski
Browse files

selftests: openvswitch: Fix escape chars in regexp.



Character sequences starting with `\` are interpreted by python as
escaped Unicode characters. However, they have other meaning in
regular expressions (e.g: "\d").

It seems Python >= 3.12 starts emitting a SyntaxWarning when these
escaped sequences are not recognized as valid Unicode characters.

An example of these warnings:

tools/testing/selftests/net/openvswitch/ovs-dpctl.py:505:
SyntaxWarning: invalid escape sequence '\d'

Fix all the warnings by flagging literals as raw strings.

Signed-off-by: default avatarAdrian Moreno <amorenoz@redhat.com>
Reviewed-by: default avatarAaron Conole <aconole@redhat.com>
Link: https://lore.kernel.org/r/20240416090913.2028475-1-amorenoz@redhat.com
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 94e2a19a
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment