Permalink
Browse files

Merge pull request #298 from pnasrat/develop

Fix #292 3.x support for mach_o_change
  • Loading branch information...
2 parents f27092d + f22d60a commit 9fb413c49492934d8a5f7c5a874ad9cb1660af21 @jezdez jezdez committed Jul 6, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 virtualenv.py
View
@@ -2404,12 +2404,12 @@ def do_macho(file, bits, endian):
name_offset = read_data(file, endian)
file.seek(where + name_offset, os.SEEK_SET)
# Read the NUL terminated string
- load = file.read(cmdsize - name_offset)
+ load = file.read(cmdsize - name_offset).decode()
load = load[:load.index('\0')]
# If the string is what is being replaced, overwrite it.
if load == what:
file.seek(where + name_offset, os.SEEK_SET)
- file.write(value + '\0')
+ file.write(value.encode() + '\0'.encode())
# Seek to the next command
file.seek(where + cmdsize, os.SEEK_SET)

0 comments on commit 9fb413c

Please sign in to comment.