[oe-commits] [openembedded-core] 50/56: sanity: check_perl_modules bug fix

git at git.openembedded.org git at git.openembedded.org
Wed Apr 10 23:12:14 UTC 2019


This is an automated email from the git hooks/post-receive script.

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

commit 7283d118e7e0d02242bfad98108d591c8e0f8a05
Author: Zheng Ruoqin <zhengrq.fnst at cn.fujitsu.com>
AuthorDate: Wed Apr 10 23:44:10 2019 +0800

    sanity: check_perl_modules bug fix
    
    Fix Python3 TypeError error in check_perl_modules:
    
    Executing bitbake, the following error message will be throwed:
    
      File ".../poky/meta/classes/sanity.bbclass", line
    979, in check_sanity_eventhandler
        check_sanity(sanity_data)
      File ".../poky/meta/classes/sanity.bbclass", line
    943, in check_sanity
        check_sanity_version_change(status, sanity_data)
      File ".../poky/meta/classes/sanity.bbclass", line
    637, in check_sanity_version_change
        status.addresult(check_perl_modules(d))
      File ".../poky/meta/classes/sanity.bbclass", line
    563, in check_perl_modules
        errresult += e.output
    TypeError: must be str, not bytes
    
    So here, transfer e.output from bytes to str.
    
    Signed-off-by: Zheng Ruoqin <zhengrq.fnst at cn.fujitsu.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 meta/classes/sanity.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index 4cbb1f3..9429202 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -560,7 +560,7 @@ def check_perl_modules(sanity_data):
         try:
             subprocess.check_output(["perl", "-e", "use %s" % m])
         except subprocess.CalledProcessError as e:
-            errresult += e.output
+            errresult += bytes.decode(e.output)
             ret += "%s " % m
     if ret:
         return "Required perl module(s) not found: %s\n\n%s\n" % (ret, errresult)

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


More information about the Openembedded-commits mailing list