Skip to contentSkip to conversation

libhugetlbfs: update patch to make it work for python3

PATCH New [email protected] 1 participant 1 message Dec 23, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libhugetlbfs: update patch to make it work for python3

From: Changqing Li <[email protected]>

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

---
 .../0001-run_test.py-not-use-hard-coded-path-.-obj-hugeadm.patch     | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
meta-oe/recipes-benchmark/libhugetlbfs/files/0001-run_test.py-not-use-hard-coded-path-.-obj-hugeadm.patch +4 -1
index 34a6220..83934ab 100644
@@ -12,6 +12,9 @@ Signed-off-by: Ting Liu <[email protected]>
 
 Update for 2.22.
 Signed-off-by: Zheng Ruoqin <[email protected]>
+
+Update to work for python3
+Signed-off-by: Changqing Li <[email protected]>
 ---
  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
Signature · 1 line
2.7.4