[oe-commits] [openembedded-core] 30/43: selftest/prservice.py: Sanitize package version when looking for stamp

git at git.openembedded.org git at git.openembedded.org
Thu Mar 10 23:15:02 UTC 2016


rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit b7ef005c9a0c24ad6a5180337d6275059c269523
Author: Mariano Lopez <mariano.lopez at linux.intel.com>
AuthorDate: Thu Mar 10 10:29:21 2016 +0000

    selftest/prservice.py: Sanitize package version when looking for stamp
    
    Currently when using a git version the check for the stamp, using regex,
    will fail because of plus sign in the version.
    
    With this change the version is escaped before adding it to the regex.
    
    Signed-off-by: Mariano Lopez <mariano.lopez at linux.intel.com>
    Signed-off-by: Ross Burton <ross.burton at intel.com>
---
 meta/lib/oeqa/selftest/prservice.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/lib/oeqa/selftest/prservice.py b/meta/lib/oeqa/selftest/prservice.py
index 66638de..1b9a510 100644
--- a/meta/lib/oeqa/selftest/prservice.py
+++ b/meta/lib/oeqa/selftest/prservice.py
@@ -27,7 +27,7 @@ class BitbakePrTests(oeSelfTest):
         package_stamps_path = "/".join(stampdata[:-1])
         stamps = []
         for stamp in os.listdir(package_stamps_path):
-            find_stamp = re.match("%s\.%s\.([a-z0-9]{32})" % (prefix, recipe_task), stamp)
+            find_stamp = re.match("%s\.%s\.([a-z0-9]{32})" % (re.escape(prefix), recipe_task), stamp)
             if find_stamp:
                 stamps.append(find_stamp.group(1))
         self.assertFalse(len(stamps) == 0, msg="Cound not find stamp for task %s for recipe %s" % (recipe_task, package_name))

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list