[rcw,3/3] rcw.py: Append to pbi with a bytestring

Message ID 20220405163507.3907691-4-sean.anderson@seco.com
State New
Headers show
Series Fix python 2->3 errors when using -r | expand

Commit Message

Sean Anderson April 5, 2022, 4:35 p.m. UTC
Regular strings cannot be concatenated with byte strings. This fixes the
following error:

> TypeError: can't concat str to bytes

Fixes: 7c47f30 ("Add support of Gen3 family SoCs")
Signed-off-by: Sean Anderson <sean.anderson@seco.com>
---

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

Patch

diff --git a/rcw.py b/rcw.py
index 42a11dc..fc58238 100755
--- a/rcw.py
+++ b/rcw.py
@@ -855,7 +855,7 @@  def create_source():
         l = len(pbi)
         # Deal reasonably with broken PBIs with, e.g., an extra LF
         # at the end
-        pbi += "\0\0\0"
+        pbi += b"\0\0\0"
         l += 3;
         l &= ~3;
         source += "\n.pbi\n"