From 5d4015659d20cfee839ccccdcfb96094ac8e610a Mon Sep 17 00:00:00 2001 From: KyleMiles Date: Wed, 6 Jun 2018 20:44:47 -0400 Subject: Various Python 3 support changes --- python/databuffer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'python/databuffer.py') diff --git a/python/databuffer.py b/python/databuffer.py index 1b29a7eb..298d0002 100644 --- a/python/databuffer.py +++ b/python/databuffer.py @@ -20,7 +20,7 @@ import ctypes -# Binary Ninja components -- additional imports belong in the appropriate class +# Binary Ninja components from binaryninja import _binaryninjacore as core @@ -114,7 +114,7 @@ class DataBuffer(object): def __str__(self): buf = ctypes.create_string_buffer(len(self)) ctypes.memmove(buf, core.BNGetDataBufferContents(self.handle), len(self)) - if type(buf.raw) is str: + if isinstance(buf.raw, str): return buf.raw else: return buf.raw.decode("charmap") -- cgit v1.3.1