diff mbox series

[1/1] pylibfdt: fix invalid escape sequence '\w'

Message ID 20240227215204.236447-1-heinrich.schuchardt@canonical.com
State Accepted
Commit d4c84d7062ecd739de8ed509782f52ddb9109f32
Delegated to: Tom Rini
Headers show
Series [1/1] pylibfdt: fix invalid escape sequence '\w' | expand

Commit Message

Heinrich Schuchardt Feb. 27, 2024, 9:52 p.m. UTC
\w is not allowed as escape sequence is strings.
Mark the regular expression with r''.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
---
 scripts/dtc/pylibfdt/setup.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/scripts/dtc/pylibfdt/setup.py b/scripts/dtc/pylibfdt/setup.py
index 8baae08770..c6fe5a6a44 100755
--- a/scripts/dtc/pylibfdt/setup.py
+++ b/scripts/dtc/pylibfdt/setup.py
@@ -37,7 +37,7 @@  with open(os.path.join(srcdir, "../README"), "r") as fh:
     long_description = fh.read()
 
 # Decodes a Makefile assignment line into key and value (and plus for +=)
-RE_KEY_VALUE = re.compile('(?P<key>\w+) *(?P<plus>[+])?= *(?P<value>.*)$')
+RE_KEY_VALUE = re.compile(r'(?P<key>\w+) *(?P<plus>[+])?= *(?P<value>.*)$')
 
 def get_top_builddir():
     if '--top-builddir' in sys.argv: