summaryrefslogtreecommitdiff
path: root/python/typearchive.py
diff options
context:
space:
mode:
authorJosh Ferrell <josh@vector35.com>2026-04-15 11:21:40 -0400
committerJosh Ferrell <josh@vector35.com>2026-04-15 11:21:44 -0400
commitb4ccb82ea76b98457d9dc59424632ca412511ed4 (patch)
tree2eb4d7875181cee7b05413fa6dcdaea3a1d95981 /python/typearchive.py
parentc08cf3f1eaa73a5171c27044100479998104d58a (diff)
[Python API] Replace bare "except:" with "except Exception:" to fix signal propagation
Diffstat (limited to 'python/typearchive.py')
-rw-r--r--python/typearchive.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/python/typearchive.py b/python/typearchive.py
index b94cd62e..d7071978 100644
--- a/python/typearchive.py
+++ b/python/typearchive.py
@@ -234,7 +234,7 @@ class TypeArchive:
def add_types(self, new_types: List[Tuple['_types.QualifiedNameType', '_types.Type']]) -> None:
"""
Add named types to the type archive. Types must have all dependent named
- types added prior to the parent types being added (or included in the list) or this
+ types added prior to the parent types being added (or included in the list) or this
function will fail. Types already existing with any added names will be overwritten.
:param new_types: Names and definitions of new types
@@ -801,25 +801,25 @@ class TypeArchiveNotificationCallbacks:
def _type_added(self, ctxt, archive: ctypes.POINTER(core.BNTypeArchive), id: ctypes.c_char_p, definition: ctypes.POINTER(core.BNType)) -> None:
try:
self._notify.type_added(self._archive, core.pyNativeStr(id), _types.Type.create(handle=core.BNNewTypeReference(definition)))
- except:
+ except Exception:
log.log_error_for_exception("Unhandled Python exception in TypeArchiveNotificationCallbacks._type_added")
def _type_updated(self, ctxt, archive: ctypes.POINTER(core.BNTypeArchive), id: ctypes.c_char_p, old_definition: ctypes.POINTER(core.BNType), new_definition: ctypes.POINTER(core.BNType)) -> None:
try:
self._notify.type_updated(self._archive, core.pyNativeStr(id), _types.Type.create(handle=core.BNNewTypeReference(old_definition)), _types.Type.create(handle=core.BNNewTypeReference(new_definition)))
- except:
+ except Exception:
log.log_error_for_exception("Unhandled Python exception in TypeArchiveNotificationCallbacks._type_updated")
def _type_renamed(self, ctxt, archive: ctypes.POINTER(core.BNTypeArchive), id: ctypes.c_char_p, old_name: ctypes.POINTER(core.BNQualifiedName), new_name: ctypes.POINTER(core.BNQualifiedName)) -> None:
try:
self._notify.type_renamed(self._archive, core.pyNativeStr(id), _types.QualifiedName._from_core_struct(old_name.contents), _types.QualifiedName._from_core_struct(new_name.contents))
- except:
+ except Exception:
log.log_error_for_exception("Unhandled Python exception in TypeArchiveNotificationCallbacks._type_renamed")
def _type_deleted(self, ctxt, archive: ctypes.POINTER(core.BNTypeArchive), id: ctypes.c_char_p, definition: ctypes.POINTER(core.BNType)) -> None:
try:
self._notify.type_deleted(self._archive, core.pyNativeStr(id), _types.Type.create(handle=core.BNNewTypeReference(definition)))
- except:
+ except Exception:
log.log_error_for_exception("Unhandled Python exception in TypeArchiveNotificationCallbacks._type_deleted")
@property