Commit 9ea52ed1 authored by Thomas Heller's avatar Thomas Heller

binascii.hexlify returns a bytes object; we must convert it to str

before we can pass it to re.sub.
parent 70cc9ba8
...@@ -6,7 +6,7 @@ import re ...@@ -6,7 +6,7 @@ import re
def dump(obj): def dump(obj):
# helper function to dump memory contents in hex, with a hyphen # helper function to dump memory contents in hex, with a hyphen
# between the bytes. # between the bytes.
h = hexlify(buffer(obj)) h = str(hexlify(buffer(obj)))
return re.sub(r"(..)", r"\1-", h)[:-1] return re.sub(r"(..)", r"\1-", h)[:-1]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment