mirror of
https://github.com/AdaCore/cpython.git
synced 2026-02-12 12:57:15 -08:00
binascii.hexlify returns a bytes object; we must convert it to str
before we can pass it to re.sub.
This commit is contained in:
@@ -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]
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user