]> code.ossystems Code Review - openembedded-core.git/commitdiff
cpan-base.bbclass: use raw string for regexp
authorAlexander Kanavin <alex.kanavin@gmail.com>
Fri, 17 Sep 2021 12:59:22 +0000 (14:59 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 19 Sep 2021 10:33:03 +0000 (11:33 +0100)
This eliminates a deprecation warning and a future error as stipulated by
https://docs.python.org/3/library/re.html

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/cpan-base.bbclass

index 9758065bfcb0dd612f96b153e0fcd58069c79ae9..93d11e1bee49a08cb51bd679ba4e61352caa8aae 100644 (file)
@@ -20,7 +20,7 @@ PERLLIBDIRS:class-native = "${libdir}/perl5"
 def cpan_upstream_check_pattern(d):
     for x in (d.getVar('SRC_URI') or '').split(' '):
         if x.startswith("https://cpan.metacpan.org"):
-            _pattern = x.split('/')[-1].replace(d.getVar('PV'), '(?P<pver>\d+.\d+)')
+            _pattern = x.split('/')[-1].replace(d.getVar('PV'), r'(?P<pver>\d+.\d+)')
             return _pattern
     return ''