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/flowgraph.py | |
| parent | c08cf3f1eaa73a5171c27044100479998104d58a (diff) | |
[Python API] Replace bare "except:" with "except Exception:" to fix signal propagation
Diffstat (limited to 'python/flowgraph.py')
| -rw-r--r-- | python/flowgraph.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/python/flowgraph.py b/python/flowgraph.py index 1037b4ce..dc2185de 100644 --- a/python/flowgraph.py +++ b/python/flowgraph.py @@ -358,7 +358,7 @@ class FlowGraphLayoutRequest: try: if self.on_complete is not None: self.on_complete() - except: + except Exception: log_error_for_exception("Unhandled Python exception in FlowGraphLayoutRequest._complete") @property @@ -474,19 +474,19 @@ class FlowGraph: def _prepare_for_layout(self, ctxt): try: self.prepare_for_layout() - except: + except Exception: log_error_for_exception("Unhandled Python exception in FlowGraph._prepare_for_layout") def _populate_nodes(self, ctxt): try: self.populate_nodes() - except: + except Exception: log_error_for_exception("Unhandled Python exception in FlowGraph._populate_nodes") def _complete_layout(self, ctxt): try: self.complete_layout() - except: + except Exception: log_error_for_exception("Unhandled Python exception in FlowGraph._complete_layout") def _update(self, ctxt): @@ -497,20 +497,20 @@ class FlowGraph: flow_graph = core.BNNewFlowGraphReference(graph.handle) assert flow_graph is not None, "core.BNNewFlowGraphReference returned None" return ctypes.cast(flow_graph, ctypes.c_void_p).value - except: + except Exception: log_error_for_exception("Unhandled Python exception in FlowGraph._update") return None def _external_ref_taken(self, ctxt): try: self.__class__._registered_instances.append(self) - except: + except Exception: log_error_for_exception("Unhandled Python exception in FlowGraph._external_ref_taken") def _external_ref_released(self, ctxt): try: self.__class__._registered_instances.remove(self) - except: + except Exception: log_error_for_exception("Unhandled Python exception in FlowGraph._external_ref_released") def finish_prepare_for_layout(self): @@ -951,7 +951,7 @@ class FlowGraphLayout: for i in range(node_handle_count): nodes.append(FlowGraphNode(graph=graph, handle=node_handles[i])) return self.layout(graph, nodes) - except: + except Exception: log_error_for_exception("Unhandled Python exception in FlowGraphLayout._layout") return False |
