Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d660fab

Browse files
author
Thomas Heller
committed
binascii.hexlify returns a bytes object; we must convert it to str
before we can pass it to re.sub.
1 parent 0d8a1fd commit d660fab

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Lib/ctypes/test/test_array_in_pointer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
def dump(obj):
77
# helper function to dump memory contents in hex, with a hyphen
88
# between the bytes.
9-
h = hexlify(buffer(obj))
9+
h = str(hexlify(buffer(obj)))
1010
return re.sub(r"(..)", r"\1-", h)[:-1]
1111

1212

0 commit comments

Comments
 (0)