Explicitly read input file in binary mode to prevent newline characters from being converted on Windows machines

This commit is contained in:
pichenettes 2013-10-21 11:27:34 +02:00
parent c0d9f993a2
commit 5ca0810ca8

View File

@ -402,7 +402,7 @@ if __name__ == "__main__":
# cmd.cmdWriteProtect([0, 1]) # cmd.cmdWriteProtect([0, 1])
if (conf['write'] or conf['verify']): if (conf['write'] or conf['verify']):
data = map(lambda c: ord(c), file(args[0]).read()) data = map(lambda c: ord(c), file(args[0], 'rb').read())
if conf['erase']: if conf['erase']:
cmd.cmdEraseMemory() cmd.cmdEraseMemory()