From d660fabd24dfd48df43bc0717cfec44385ae736e Mon Sep 17 00:00:00 2001 From: Thomas Heller Date: Thu, 12 Jul 2007 19:56:28 +0000 Subject: [PATCH] binascii.hexlify returns a bytes object; we must convert it to str before we can pass it to re.sub. --- Lib/ctypes/test/test_array_in_pointer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/ctypes/test/test_array_in_pointer.py b/Lib/ctypes/test/test_array_in_pointer.py index 3ed310cc68..0b46fb98c1 100644 --- a/Lib/ctypes/test/test_array_in_pointer.py +++ b/Lib/ctypes/test/test_array_in_pointer.py @@ -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] -- 2.50.0