summaryrefslogtreecommitdiff
path: root/python/databuffer.py
diff options
context:
space:
mode:
authorKyleMiles <krm504@nyu.edu>2018-06-06 20:44:47 -0400
committerRyan Snyder <ryan@vector35.com>2018-07-10 18:11:09 -0400
commit5d4015659d20cfee839ccccdcfb96094ac8e610a (patch)
tree8ccf2888610ce6fa604ae25ccbf5a4083c3a3459 /python/databuffer.py
parent3ead1e28774663514992adea4ad2c38b0416e66d (diff)
Various Python 3 support changes
Diffstat (limited to 'python/databuffer.py')
-rw-r--r--python/databuffer.py4
1 files changed, 2 insertions, 2 deletions
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")