0
0
mirror of https://github.com/bec-project/bec_widgets.git synced 2025-07-14 11:41:49 +02:00

fix: don't print exception if the auto-update module cannot be found in plugins

This commit is contained in:
2024-06-23 14:04:38 +02:00
parent 66daae6d9e
commit 860517a321

View File

@ -141,6 +141,10 @@ class BECGuiClientMixin:
for ep in eps: for ep in eps:
if ep.name == "plugin_widgets_update": if ep.name == "plugin_widgets_update":
try: 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) return ep.load()(gui=self)
except Exception as e: except Exception as e:
print(f"Error loading auto update script from plugin: {str(e)}") print(f"Error loading auto update script from plugin: {str(e)}")