From b4ccb82ea76b98457d9dc59424632ca412511ed4 Mon Sep 17 00:00:00 2001 From: Josh Ferrell Date: Wed, 15 Apr 2026 11:21:40 -0400 Subject: [Python API] Replace bare "except:" with "except Exception:" to fix signal propagation --- python/filemetadata.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'python/filemetadata.py') diff --git a/python/filemetadata.py b/python/filemetadata.py index 23965ac9..bfce4f98 100644 --- a/python/filemetadata.py +++ b/python/filemetadata.py @@ -50,7 +50,7 @@ class NavigationHandler: def _get_current_view(self, ctxt: Any): try: view = self.get_current_view() - except: + except Exception: log_error_for_exception("Unhandled Python exception in NavigationHandler._get_current_view") view = "" return core.BNAllocString(view) @@ -58,14 +58,14 @@ class NavigationHandler: def _get_current_offset(self, ctxt: Any) -> int: try: return self.get_current_offset() - except: + except Exception: log_error_for_exception("Unhandled Python exception in NavigationHandler._get_current_offset") return 0 def _navigate(self, ctxt: Any, view: ViewName, offset: int) -> bool: try: return self.navigate(view, offset) - except: + except Exception: log_error_for_exception("Unhandled Python exception in NavigationHandler._navigate") return False @@ -390,7 +390,7 @@ class FileMetadata: try: yield state self.commit_undo_actions(state) - except: + except Exception: self.revert_undo_actions(state) raise -- cgit v1.3.1