diff options
author | Thomas Heller <theller@ctypes.org> | 2007-07-12 19:56:28 (GMT) |
---|---|---|
committer | Thomas Heller <theller@ctypes.org> | 2007-07-12 19:56:28 (GMT) |
commit | d660fabd24dfd48df43bc0717cfec44385ae736e (patch) | |
tree | 8779497af34012a6c8b791643d655c9d5b6a678f | |
parent | 0d8a1fd78d68093631e3ad8d8b19b0af300807c5 (diff) | |
download | cpython-d660fabd24dfd48df43bc0717cfec44385ae736e.zip cpython-d660fabd24dfd48df43bc0717cfec44385ae736e.tar.gz cpython-d660fabd24dfd48df43bc0717cfec44385ae736e.tar.bz2 |
binascii.hexlify returns a bytes object; we must convert it to str
before we can pass it to re.sub.
-rw-r--r-- | Lib/ctypes/test/test_array_in_pointer.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/ctypes/test/test_array_in_pointer.py b/Lib/ctypes/test/test_array_in_pointer.py index 3ed310c..0b46fb9 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] |