From: Thomas Heller Date: Thu, 12 Jul 2007 19:56:28 +0000 (+0000) Subject: binascii.hexlify returns a bytes object; we must convert it to str X-Git-Tag: v3.0a1~653 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d660fabd24dfd48df43bc0717cfec44385ae736e;p=thirdparty%2FPython%2Fcpython.git binascii.hexlify returns a bytes object; we must convert it to str before we can pass it to re.sub. --- diff --git a/Lib/ctypes/test/test_array_in_pointer.py b/Lib/ctypes/test/test_array_in_pointer.py index 3ed310cc6841..0b46fb98c175 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]