diff options
author | Douglas Royds <douglas.royds@taitradio.com> | 2021-10-15 13:13:41 +1300 |
---|---|---|
committer | Richard Leitner <richard.leitner@skidata.com> | 2021-11-17 17:44:26 +0100 |
commit | e5444bfb0a09d19485b8b2099305b5e289f45a26 (patch) | |
tree | 56f17fa2200366a74e75318d7ab33c5843825225 /classes | |
parent | 59ab2699d4f1300ae92e4c2c92642e57f849db87 (diff) | |
download | meta-java-e5444bfb0a09d19485b8b2099305b5e289f45a26.tar.gz |
openjdk-build-helper: Use python raw string for regex pattern
See https://docs.python.org/3/library/re.html
Invalid escape sequences in Python’s usage of the backslash in string literals
now generate a DeprecationWarning, and in the future this will become a
SyntaxError. The solution is to use Python’s raw string notation for regular
expression patterns; backslashes are not handled in any special way in a string
literal prefixed with 'r'.
Signed-off-by: Douglas Royds <douglas.royds@taitradio.com>
Signed-off-by: Richard Leitner <richard.leitner@skidata.com>
Diffstat (limited to 'classes')
-rw-r--r-- | classes/openjdk-build-helper.bbclass | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/classes/openjdk-build-helper.bbclass b/classes/openjdk-build-helper.bbclass index 9a6c492..1aeca8d 100644 --- a/classes/openjdk-build-helper.bbclass +++ b/classes/openjdk-build-helper.bbclass | |||
@@ -45,7 +45,7 @@ def openjdk_build_helper_get_target_cflags(d): | |||
45 | # doesn't work anyway. | 45 | # doesn't work anyway. |
46 | version = d.getVar('GCCVERSION')[0] | 46 | version = d.getVar('GCCVERSION')[0] |
47 | # skip non digit characters at the beginning, e.g. from "linaro-6.2%" | 47 | # skip non digit characters at the beginning, e.g. from "linaro-6.2%" |
48 | match = re.search("\d", version) | 48 | match = re.search(r"\d", version) |
49 | if match: | 49 | if match: |
50 | version = version[match.start():] | 50 | version = version[match.start():] |
51 | return openjdk_build_helper_get_cflags_by_cc_version(d, version) | 51 | return openjdk_build_helper_get_cflags_by_cc_version(d, version) |