Skip to content

Commit

Permalink
short circuit exception handling for mlil/hlil_functions
Browse files Browse the repository at this point in the history
  • Loading branch information
psifertex committed Nov 30, 2023
1 parent cd870e8 commit 49cb6a4
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions python/binaryview.py
Original file line number Diff line number Diff line change
Expand Up @@ -2597,11 +2597,9 @@ def mlil_functions(
self, self.preload_limit if preload_limit is None else preload_limit, function_generator
):
try:
mlil = func.mlil
yield func.mlil
except ILException:
mlil = None
if mlil:
yield mlil
pass

def hlil_functions(
self, preload_limit: Optional[int] = None,
Expand All @@ -2615,11 +2613,9 @@ def hlil_functions(
self, self.preload_limit if preload_limit is None else preload_limit, function_generator
):
try:
hlil = func.hlil
yield func.hlil
except ILException:
hlil = None
if hlil:
yield hlil
pass

@property
def has_functions(self) -> bool:
Expand Down

0 comments on commit 49cb6a4

Please sign in to comment.