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.
This commit is contained in:
Reed 2015-03-02 10:28:31 -08:00
parent 40e6fb4387
commit 3fdc0692d9

View File

@ -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(',')