From 860517a3211075d1f6e2af7fa6a567b9e0cd77f3 Mon Sep 17 00:00:00 2001 From: wakonig_k Date: Sun, 23 Jun 2024 14:04:38 +0200 Subject: [PATCH] fix: don't print exception if the auto-update module cannot be found in plugins --- bec_widgets/cli/client_utils.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bec_widgets/cli/client_utils.py b/bec_widgets/cli/client_utils.py index 29c961de..5ae04651 100644 --- a/bec_widgets/cli/client_utils.py +++ b/bec_widgets/cli/client_utils.py @@ -141,6 +141,10 @@ class BECGuiClientMixin: for ep in eps: if ep.name == "plugin_widgets_update": try: + spec = importlib.util.find_spec(ep.module) + # if the module is not found, we skip it + if spec is None: + continue return ep.load()(gui=self) except Exception as e: print(f"Error loading auto update script from plugin: {str(e)}")