Commit d660fabd 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 0d8a1fd7
......@@ -6,7 +6,7 @@ import re
def dump(obj):
# helper function to dump memory contents in hex, with a hyphen
# between the bytes.
h = hexlify(buffer(obj))
h = str(hexlify(buffer(obj)))
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