diff options
| author | Brandon Miller <brandon@vector35.com> | 2025-04-07 11:00:27 -0400 |
|---|---|---|
| committer | Brandon Miller <brandon@vector35.com> | 2025-04-07 15:52:27 -0400 |
| commit | bb2b80d9b09f67859081ff3cd30d118c9d0372f5 (patch) | |
| tree | a30c4780d9c6b0f2f28a75051f2142650a8a2f50 /python/binaryview.py | |
| parent | 34e464b40adee31b9247d40435340767b360319c (diff) | |
Return None instead of raising in func IL getters
Return None instead of raising an ILException in Python Function.llil,
mlil, etc to allow these properties to play nice with map and filter
Diffstat (limited to 'python/binaryview.py')
| -rw-r--r-- | python/binaryview.py | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/python/binaryview.py b/python/binaryview.py index 250d69ab..b0ca13ef 100644 --- a/python/binaryview.py +++ b/python/binaryview.py @@ -47,7 +47,7 @@ from .enums import ( TypeClass, BinaryViewEventType, FunctionGraphType, TagReferenceType, TagTypeType, RegisterValueType, DisassemblyOption, RelocationType ) -from .exceptions import RelocationWriteException, ILException, ExternalLinkException +from .exceptions import RelocationWriteException, ExternalLinkException from . import associateddatastore # required for _BinaryViewAssociatedDataStore from .log import log_warn, log_error, Logger @@ -3181,10 +3181,7 @@ class BinaryView: for func in AdvancedILFunctionList( self, self.preload_limit if preload_limit is None else preload_limit, function_generator ): - try: - yield func.mlil - except ILException: - pass + yield func.mlil def hlil_functions( self, preload_limit: Optional[int] = None, @@ -3197,10 +3194,7 @@ class BinaryView: for func in AdvancedILFunctionList( self, self.preload_limit if preload_limit is None else preload_limit, function_generator ): - try: - yield func.hlil - except ILException: - pass + yield func.hlil @property def has_functions(self) -> bool: |
