[rcw][PATCH 2/3] rcw.py: Fix using ord on ints

Sean Anderson <[email protected]> Tue, 5 Apr 2022 12:35:04 -0400
Newsgroups org.yoctoproject.lists.meta-freescale
Message-ID <[email protected]>
Iterating over a bytestring will yield integers in python 3, so we don't
need to convert them with ord(). This avoids the following error:

> TypeError: ord() expected string of length 1, but int found

Fixes: 7c47f30 ("Add support of Gen3 family SoCs")
Signed-off-by: Sean Anderson <[email protected]>
---

 rcw.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rcw.py b/rcw.py
index 266a44f..42a11dc 100755
--- a/rcw.py
+++ b/rcw.py
@@ -811,7 +811,7 @@ def create_source():
     # After this stage, all the RCW bits should be formatted with lsb on
     # the right side and msb on the left side to permit conversion into
     # a very long uint.
-    bitstring = ''.join(['{0:08b}'.format(ord(x)) for x in bitbytes])[::-1]
+    bitstring = ''.join(['{0:08b}'.format(x) for x in bitbytes])[::-1]
     bits = int(bitstring, 2)
 
     # Loop over all the known symbols
-- 
2.35.1.1320.gc452695387.dirty