]> git.ipfire.org Git - thirdparty/u-boot.git/commit
pylibfdt: Fix "invalid escape sequence '\w'" in setup.py
authorFlorian Schmaus <flo@geekplace.eu>
Tue, 20 Feb 2024 13:52:48 +0000 (08:52 -0500)
committerTom Rini <trini@konsulko.com>
Fri, 1 Mar 2024 14:53:47 +0000 (09:53 -0500)
commitd4c84d7062ecd739de8ed509782f52ddb9109f32
tree3e8c0a0b8719fc16c5d71aa6eebb765c1232420a
parent72703c7a0dd8ede6c98d13152fc1ebd3da4bc128
pylibfdt: Fix "invalid escape sequence '\w'" in setup.py

Once u-boot's build system invokes

python3 scripts/dtc/pylibfdt/setup.py --quiet build_ext --inplace

it may fail with

scripts/dtc/pylibfdt/setup.py:40: SyntaxWarning: invalid escape sequence '\w'
  RE_KEY_VALUE = re.compile('(?P<key>\w+) *(?P<plus>[+])?= *(?P<value>.*)$')

depending on the used Python version.

Explicitly mark the regex string as raw string to avoid the warning.

Signed-off-by: Florian Schmaus <flo@geekplace.eu>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
scripts/dtc/pylibfdt/setup.py