Skip to contentSkip to conversation

rt_bmark.py: fix TypeError

PATCH New [email protected] 1 participant 1 message Jul 16, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rt_bmark.py: fix TypeError

From: Changqing Li <[email protected]>

Fix following error:
File "/usr/lib64/rt-tests/ptest/./rt_bmark.py", line 287, in run_cyclictest_once
m = rex.search(line)
^^^^^^^^^^^^^^^^
TypeError: cannot use a string pattern on a bytes-like object

---
 meta/recipes-rt/rt-tests/files/rt_bmark.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-rt/rt-tests/files/rt_bmark.py +1 -1
index 2a4eed412f..5d22623656 100755
@@ -284,7 +284,7 @@ def run_cyclictest_once():
         avg_cnt = 0
 
         for line in res.splitlines():
-                m = rex.search(line)
+                m = rex.search(line.decode('utf-8'))
                 if m is not None:
                         minlist.append(int(m.group(2)))
                         maxlist.append(int(m.group(4)))
Signature · 1 line
2.25.1