]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
binascii.hexlify returns a bytes object; we must convert it to str
authorThomas Heller <theller@ctypes.org>
Thu, 12 Jul 2007 19:56:28 +0000 (19:56 +0000)
committerThomas Heller <theller@ctypes.org>
Thu, 12 Jul 2007 19:56:28 +0000 (19:56 +0000)
before we can pass it to re.sub.

Lib/ctypes/test/test_array_in_pointer.py

index 3ed310cc6841c30206c3f08a6806559c7402698e..0b46fb98c175d0ab24b99a1eb159d6fff4648a4c 100644 (file)
@@ -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]