summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/selftest/cases/prservice.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2019-02-05 14:17:58 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-02-16 08:19:34 +0000
commite1e38c9bd16220f78068299cd90692d96d045bf9 (patch)
tree61ea2bf816f730d2d48545facdce89b020e06131 /meta/lib/oeqa/selftest/cases/prservice.py
parent8d2dd4a30034559838e2433ad58aeffccaf40555 (diff)
downloadpoky-e1e38c9bd16220f78068299cd90692d96d045bf9.tar.gz
lib/oe,oeqa/selftest: Fix DeprecationWarning: invalid escape sequence
Fix another load of regex escape sequence warnings for newer python versions. (From OE-Core rev: bd2c125bb9c362b6122e99dfdf4e1cfe12c26a90) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/selftest/cases/prservice.py')
-rw-r--r--meta/lib/oeqa/selftest/cases/prservice.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/meta/lib/oeqa/selftest/cases/prservice.py b/meta/lib/oeqa/selftest/cases/prservice.py
index 479e520618..796ad4f5fe 100644
--- a/meta/lib/oeqa/selftest/cases/prservice.py
+++ b/meta/lib/oeqa/selftest/cases/prservice.py
@@ -19,7 +19,7 @@ class BitbakePrTests(OESelftestTestCase):
19 def get_pr_version(self, package_name): 19 def get_pr_version(self, package_name):
20 package_data_file = os.path.join(self.pkgdata_dir, 'runtime', package_name) 20 package_data_file = os.path.join(self.pkgdata_dir, 'runtime', package_name)
21 package_data = ftools.read_file(package_data_file) 21 package_data = ftools.read_file(package_data_file)
22 find_pr = re.search("PKGR: r[0-9]+\.([0-9]+)", package_data) 22 find_pr = re.search(r"PKGR: r[0-9]+\.([0-9]+)", package_data)
23 self.assertTrue(find_pr, "No PKG revision found in %s" % package_data_file) 23 self.assertTrue(find_pr, "No PKG revision found in %s" % package_data_file)
24 return int(find_pr.group(1)) 24 return int(find_pr.group(1))
25 25
@@ -29,7 +29,7 @@ class BitbakePrTests(OESelftestTestCase):
29 package_stamps_path = "/".join(stampdata[:-1]) 29 package_stamps_path = "/".join(stampdata[:-1])
30 stamps = [] 30 stamps = []
31 for stamp in os.listdir(package_stamps_path): 31 for stamp in os.listdir(package_stamps_path):
32 find_stamp = re.match("%s\.%s\.([a-z0-9]{32})" % (re.escape(prefix), recipe_task), stamp) 32 find_stamp = re.match(r"%s\.%s\.([a-z0-9]{32})" % (re.escape(prefix), recipe_task), stamp)
33 if find_stamp: 33 if find_stamp:
34 stamps.append(find_stamp.group(1)) 34 stamps.append(find_stamp.group(1))
35 self.assertFalse(len(stamps) == 0, msg="Cound not find stamp for task %s for recipe %s" % (recipe_task, package_name)) 35 self.assertFalse(len(stamps) == 0, msg="Cound not find stamp for task %s for recipe %s" % (recipe_task, package_name))