Skip to content

Commit

Permalink
Fix program_security_page for python3
Browse files Browse the repository at this point in the history
In python3 if you read from a file using 'r' you get strings, not bytes.
The API for programming expects bytes, so change accordingly.
  • Loading branch information
bluecmd committed Jan 13, 2020
1 parent 165c7e9 commit a8e0250
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion programmer/tinyprog/__main__.py
Expand Up @@ -479,7 +479,7 @@ def progress(info):
print(" Programming %s security page with %s" % (
active_port, args.security))

data = open(args.security, 'r').read()
data = open(args.security, 'rb').read()

if args.addr is not None:
addr = parse_int(args.addr)
Expand Down

0 comments on commit a8e0250

Please sign in to comment.