From ad30b5c9707ee8f10ac9b9af96fb43e8abb33033 Mon Sep 17 00:00:00 2001 From: wyzula-jan Date: Mon, 7 Apr 2025 14:31:01 +0200 Subject: [PATCH] WIP cli server fix for RPC=False --- bec_widgets/utils/cli_server.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bec_widgets/utils/cli_server.py b/bec_widgets/utils/cli_server.py index 48fa91ba..f59adf14 100644 --- a/bec_widgets/utils/cli_server.py +++ b/bec_widgets/utils/cli_server.py @@ -167,7 +167,9 @@ class CLIServer: # 1) Gather ALL BECConnector-based widgets all_qwidgets = QApplication.allWidgets() bec_widgets = set(w for w in all_qwidgets if isinstance(w, BECConnector)) - bec_widgets = {c for c in bec_widgets if c.RPC is not False} # FIXME not needed + bec_widgets = { + c for c in bec_widgets if not (hasattr(c, "RPC") and c.RPC is False) + } # FIXME not needed # 2) Also gather BECConnector-based data items from PlotBase # TODO do we need to access plot data items in cli in namespace?