diff options
| author | Josh Ferrell <josh@vector35.com> | 2026-04-15 11:21:40 -0400 |
|---|---|---|
| committer | Josh Ferrell <josh@vector35.com> | 2026-04-15 11:21:44 -0400 |
| commit | b4ccb82ea76b98457d9dc59424632ca412511ed4 (patch) | |
| tree | 2eb4d7875181cee7b05413fa6dcdaea3a1d95981 /python/filemetadata.py | |
| parent | c08cf3f1eaa73a5171c27044100479998104d58a (diff) | |
[Python API] Replace bare "except:" with "except Exception:" to fix signal propagation
Diffstat (limited to 'python/filemetadata.py')
| -rw-r--r-- | python/filemetadata.py | 8 |
1 files changed, 4 insertions, 4 deletions
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 |
