[oe] [meta-oe][PATCH] libhugetlbfs: update patch to make it work for python3

changqing.li at windriver.com changqing.li at windriver.com
Mon Dec 23 06:42:37 UTC 2019


From: Changqing Li <changqing.li at windriver.com>

Fix error:
TypeError: a bytes-like object is required, not 'str'

Signed-off-by: Changqing Li <changqing.li at windriver.com>
---
 .../0001-run_test.py-not-use-hard-coded-path-.-obj-hugeadm.patch     | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-run_test.py-not-use-hard-coded-path-.-obj-hugeadm.patch b/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-run_test.py-not-use-hard-coded-path-.-obj-hugeadm.patch
index 34a6220..83934ab 100644
--- a/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-run_test.py-not-use-hard-coded-path-.-obj-hugeadm.patch
+++ b/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-run_test.py-not-use-hard-coded-path-.-obj-hugeadm.patch
@@ -12,6 +12,9 @@ Signed-off-by: Ting Liu <b28495 at freescale.com>
 
 Update for 2.22.
 Signed-off-by: Zheng Ruoqin <zhengrq.fnst at cn.fujitsu.com>
+
+Update to work for python3
+Signed-off-by: Changqing Li <changqing.li at windriver.com>
 ---
  tests/run_tests.py | 12 +++++++++++-
  1 file changed, 11 insertions(+), 1 deletion(-)
@@ -36,7 +39,7 @@ index 018264d..0aabcd1 100755
 +        return sizes
 +    except OSError:
 +        return sizes
-+    out = p.stdout.read().strip()
++    out = p.stdout.read().decode().strip()
 +
      if rc != 0 or out == "":
          return sizes
-- 
2.7.4



More information about the Openembedded-devel mailing list