Philipp Hörist pushed to branch master at gajim / gajim
Commits: 2b7006e8 by Philipp Hörist at 2018-10-13T12:13:38Z Catch exceptions when loading plugins
- - - - -
1 changed file:
- gajim/plugins/pluginmanager.py
Changes:
===================================== gajim/plugins/pluginmanager.py ===================================== @@ -179,7 +179,12 @@ class PluginManager(metaclass=Singleton): :todo: what about adding plug-ins that are already added? Module reload and adding class from reloaded module or ignoring adding plug-in? ''' - plugin = plugin_class() + try: + plugin = plugin_class() + except Exception: + log.exception('Error while loading a plugin') + return + if plugin not in self.plugins: if not self._plugin_has_entry_in_global_config(plugin): self._create_plugin_entry_in_global_config(plugin)
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/2b7006e8837d60096e56730443f59478654...