Skip to content

Commit a8e0250

Browse files
authored
Fix program_security_page for python3
In python3 if you read from a file using 'r' you get strings, not bytes. The API for programming expects bytes, so change accordingly.
1 parent 165c7e9 commit a8e0250

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

programmer/tinyprog/__main__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,7 @@ def progress(info):
479479
print(" Programming %s security page with %s" % (
480480
active_port, args.security))
481481

482-
data = open(args.security, 'r').read()
482+
data = open(args.security, 'rb').read()
483483

484484
if args.addr is not None:
485485
addr = parse_int(args.addr)

0 commit comments

Comments
 (0)