From 3fdc0692d959d80d125e99935ba2d0a5f8062172 Mon Sep 17 00:00:00 2001 From: Reed Date: Mon, 2 Mar 2015 10:28:31 -0800 Subject: Update file2str.py On line 43, wouldn't "ord(b)" simply be "b" since each iteration through a "bytes" type already returns an "int"? In Python 3.x, the "ord" function expects type "str" so passing an "int" causes a "TypeError" exception. --- src/build/file2str.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/build/file2str.py b/src/build/file2str.py index ee5ce21541d..fbd39557281 100644 --- a/src/build/file2str.py +++ b/src/build/file2str.py @@ -40,7 +40,7 @@ try: chunk = src.read(16) if chunk: for b in chunk: - dst.write('0x%02x' % ord(b)) + dst.write('0x%02x' % b) offs = offs + 1 if offs != bytes: dst.write(',') -- cgit v1.2.3