summaryrefslogtreecommitdiff
path: root/python/basicblock.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/basicblock.py')
-rw-r--r--python/basicblock.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/python/basicblock.py b/python/basicblock.py
index 0195bbdc..98cc79fa 100644
--- a/python/basicblock.py
+++ b/python/basicblock.py
@@ -66,7 +66,11 @@ class BasicBlock:
core.BNFreeBasicBlock(self.handle)
def __repr__(self):
- return f"<block: {self.arch.name}@{self.start:#x}-{self.end:#x}>"
+ arch = self.arch
+ if arch:
+ return f"<{self.__class__.__name__}: {arch.name}@{self.start}-{self.end}>"
+ else:
+ return f"<{self.__class__.__name__}: {self.start}-{self.end}>"
def __len__(self):
return int(core.BNGetBasicBlockLength(self.handle))