mirror of
https://github.com/holub/mame
synced 2025-06-01 02:21:48 +03:00
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:
parent
40e6fb4387
commit
3fdc0692d9
@ -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(',')
|
||||
|
Loading…
Reference in New Issue
Block a user