Skip to content

Commit d4a7ed9

Browse files
committed
Fix some python API error messages
1 parent 50f3a4d commit d4a7ed9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

python/function.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ def __getitem__(self, i: Union[int, slice]) -> Union['basicblock.BasicBlock', Li
280280
elif isinstance(i, slice):
281281
result = []
282282
if i.start < 0 or i.start >= len(self) or i.stop < 0 or i.stop >= len(self):
283-
raise IndexError(f"Slice {i} out of bounds for FunctionList of size {len(self)}")
283+
raise IndexError(f"Slice {i} out of bounds for BasicBlockList of size {len(self)}")
284284

285285
for j in range(i.start, i.stop, i.step if i.step is not None else 1):
286286
block = core.BNNewBasicBlockReference(self._blocks[j])
@@ -401,7 +401,7 @@ def __getitem__(
401401
elif isinstance(i, slice):
402402
result = []
403403
if i.start < 0 or i.start >= len(self) or i.stop < 0 or i.stop >= len(self):
404-
raise IndexError(f"Slice {i} out of bounds for FunctionList of size {len(self)}")
404+
raise IndexError(f"Slice {i} out of bounds for TagList of size {len(self)}")
405405

406406
for j in range(i.start, i.stop, i.step if i.step is not None else 1):
407407
core_tag = core.BNNewTagReference(self._tags[j].tag)

0 commit comments

Comments
 (0)