Skip to contentSkip to conversation

rt_bmark.py: fix TypeError

PATCH Changqing Li 1 participant 1 message Jul 26, 2024 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

ping

Quoted 35 lines · Changqing Li via lists.openembedded.org

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 -2
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)))
 
-=-=-=-=-=-=-=-=-=-=-=-

Links: You receive all messages sent to this group.
View/Reply Online (#202079):https://lists.openembedded.org/g/openembedded-core/message/202079 Mute This Topic:https://lists.openembedded.org/mt/107246061/3616873
Group Owner:[email protected] Unsubscribe:https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-