summaryrefslogtreecommitdiff
path: root/python/binaryview.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/binaryview.py')
-rw-r--r--python/binaryview.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/python/binaryview.py b/python/binaryview.py
index ac08ad76..b1bc4822 100644
--- a/python/binaryview.py
+++ b/python/binaryview.py
@@ -372,12 +372,12 @@ class BinaryViewType(with_metaclass(_BinaryViewTypeMetaclass, object)):
@property
def name(self):
"""BinaryView name (read-only)"""
- return core.BNGetBinaryViewTypeName(self.handle).decode('utf8')
+ return core.BNGetBinaryViewTypeName(self.handle)
@property
def long_name(self):
"""BinaryView long name (read-only)"""
- return core.BNGetBinaryViewTypeLongName(self.handle).decode('utf8')
+ return core.BNGetBinaryViewTypeLongName(self.handle)
def __repr__(self):
return "<view type: '%s'>" % self.name
@@ -423,6 +423,9 @@ class BinaryViewType(with_metaclass(_BinaryViewTypeMetaclass, object)):
else:
bv = cls[available.name].open(filename)
+ if bv is None:
+ raise Exception("Unknown Architecture/Architecture Not Found (check plugins folder)")
+
if update_analysis:
bv.update_analysis_and_wait()
return bv
@@ -1740,7 +1743,7 @@ class BinaryView(object):
\'\\xcf\\xfa\\xed\\xfe\'
"""
buf = databuffer.DataBuffer(handle=core.BNReadViewBuffer(self.handle, addr, length))
- return str(buf)
+ return bytes(buf)
def write(self, addr, data):
"""