Daniel Brötzmann pushed to branch master at gajim / gajim
Commits:
c44309f8 by wurstsalat at 2025-07-28T23:36:57+02:00
fix: Plugins: Don't fail when trying to check for plugin errors; improve logging
- - - - -
2 changed files:
- gajim/gtk/plugins.py
- gajim/plugins/pluginmanager.py
Changes:
=====================================
gajim/gtk/plugins.py
=====================================
@@ -381,11 +381,14 @@ def _get_plugin_icon(self) -> Gtk.Image:
return image
def _get_error(self) -> tuple[bool, str]:
+ """Returns has_error, error_text"""
if not self._installed:
return False, ""
plugin = app.plugin_manager.get_plugin(self._manifest.short_name)
- assert plugin is not None
+ if plugin is None:
+ return True, _("Plugin could not be loaded")
+
if not plugin.activatable:
return True, plugin.available_text
return False, ""
=====================================
gajim/plugins/pluginmanager.py
=====================================
@@ -161,7 +161,9 @@ def _load_plugin_module(self,
assert spec.loader is not None
spec.loader.exec_module(module)
except Exception as error:
- log.warning('Error while loading module: %s', error)
+ log.warning(
+ '%s: Error while loading module: %s', manifest.short_name,
error
+ )
return None
for module_attr_name in dir(module):
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/c44309f80c89342e1ed2138310051b5365b546f9
--
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/c44309f80c89342e1ed2138310051b5365b546f9
You're receiving this email because of your account on dev.gajim.org.
_______________________________________________
Commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]