From 657c1dc1bf8855c71a08a61adbcb58dd43b23f11 Mon Sep 17 00:00:00 2001 From: Christopher Schramm Date: Wed, 18 Dec 2024 00:40:28 +0100 Subject: [PATCH] Fix fatal LoadException It looks like this rarely ever manifests, but we erroneously stopped catching the exception in https://github.com/blueman-project/blueman/commit/c71294c1cc1246e55da263a9d0014c94977716df. --- CHANGELOG.md | 4 ++++ blueman/main/PluginManager.py | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d15c22f1b..905ebda9d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## main +### Bugs fixed + +* Fatal LoadException + ### Changes * Terminate applet on manager termination if it was started by manager diff --git a/blueman/main/PluginManager.py b/blueman/main/PluginManager.py index 0cd6466fa..32fba5b69 100644 --- a/blueman/main/PluginManager.py +++ b/blueman/main/PluginManager.py @@ -122,7 +122,10 @@ def load_plugin(self, name: str | None = None, user_action: bool = False) -> Non if (cls.__autoload__ or (cl and cls.__name__ in cl)) and \ not (cls.__unloadable__ and cl and "!" + cls.__name__ in cl): - self.__load_plugin(cls) + try: + self.__load_plugin(cls) + except LoadException: + pass def disable_plugin(self, plugin: str) -> bool: return False