1
0
mirror of https://git.yoctoproject.org/poky synced 2026-07-16 03:47:03 +00:00

classes: Correctly markup regex strings

There are various escape characters in these stings which python warns
about so use the correct regex markup for them.

(From OE-Core rev: 252b69c9f2abe3258366c540f56b156ed63e5437)

(From OE-Core rev: 778f33d40c7e2f4174cc99d25516e5db63d6f75b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie
2018-12-07 00:04:50 +00:00
parent 91c93503fd
commit 5ab73d1747
5 changed files with 19 additions and 19 deletions
+2 -2
View File
@@ -1,11 +1,11 @@
def get_minor_dir(v):
import re
m = re.match("^([0-9]+)\.([0-9]+)", v)
m = re.match(r"^([0-9]+)\.([0-9]+)", v)
return "%s.%s" % (m.group(1), m.group(2))
def get_real_name(n):
import re
m = re.match("^([a-z]+(-[a-z]+)?)(-[0-9]+\.[0-9]+)?", n)
m = re.match(r"^([a-z]+(-[a-z]+)?)(-[0-9]+\.[0-9]+)?", n)
return "%s" % (m.group(1))
VERMINOR = "${@get_minor_dir("${PV}")}"