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/collaboration/merge.py | |
| parent | c08cf3f1eaa73a5171c27044100479998104d58a (diff) | |
[Python API] Replace bare "except:" with "except Exception:" to fix signal propagation
Diffstat (limited to 'python/collaboration/merge.py')
| -rw-r--r-- | python/collaboration/merge.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/python/collaboration/merge.py b/python/collaboration/merge.py index 1df16c57..6a2becda 100644 --- a/python/collaboration/merge.py +++ b/python/collaboration/merge.py @@ -226,7 +226,7 @@ class ConflictHandler: for i in range(count): py_conflicts[core.pyNativeStr(keys[i])] = MergeConflict(handle=conflicts[i]) return self.handle(py_conflicts) - except: + except Exception: traceback.print_exc(file=sys.stderr) return False @@ -270,7 +270,7 @@ class ConflictSplitter: def _get_name(self, ctxt: ctypes.c_void_p) -> ctypes.c_char_p: try: return core.BNAllocString(core.cstr(self.name)) - except: + except Exception: # Not sure why your get_name() would throw but let's handle it anyway traceback.print_exc(file=sys.stderr) return core.BNAllocString(core.cstr(type(self).__name__)) @@ -278,20 +278,20 @@ class ConflictSplitter: def _reset(self, ctxt: ctypes.c_void_p): try: self.reset() - except: + except Exception: traceback.print_exc(file=sys.stderr) def _finished(self, ctxt: ctypes.c_void_p): try: self.finished() - except: + except Exception: traceback.print_exc(file=sys.stderr) def _can_split(self, ctxt: ctypes.c_void_p, key: ctypes.c_char_p, conflict: core.BNAnalysisMergeConflictHandle) -> bool: try: py_conflict = MergeConflict(handle=conflict) return self.can_split(core.pyNativeStr(key), py_conflict) - except: + except Exception: traceback.print_exc(file=sys.stderr) return False @@ -328,7 +328,7 @@ class ConflictSplitter: new_conflicts[0][i] = self._split_conflicts[-1]._handle return True - except: + except Exception: traceback.print_exc(file=sys.stderr) return False |
