Philipp Hörist pushed to branch master at gajim / gajim
Commits:
f43aeeb5 by lovetox at 2022-05-28T09:28:09+02:00
fix: Don’t fail on GajimPlugin equality test
- - - - -
7857ebea by lovetox at 2022-05-28T09:48:41+02:00
fix: Plugins: Unregister modules after calling deactivate()
- - - - -
2 changed files:
- gajim/plugins/gajimplugin.py
- gajim/plugins/pluginmanager.py
Changes:
=====================================
gajim/plugins/gajimplugin.py
=====================================
@@ -96,6 +96,8 @@ def load_config(self) -> None:
self.config.load()
def __eq__(self, plugin: Any) -> bool:
+ if not isinstance(plugin, GajimPlugin):
+ return False
return self.manifest.short_name == plugin.manifest.short_name
def __ne__(self, plugin: Any) -> bool:
=====================================
gajim/plugins/pluginmanager.py
=====================================
@@ -543,10 +543,12 @@ def deactivate_plugin(self, plugin: GajimPlugin) -> None:
self._remove_events_handler_from_ged(plugin)
self._remove_name_from_encryption_plugins(plugin)
- self._unregister_modules_with_handlers(plugin)
- # removing plug-in from active plug-ins list
+ # deactivate() must be before _unregister_modules_with_handlers(),
+ # because plugin.deactivate() may want to use the module
plugin.deactivate()
+
+ self._unregister_modules_with_handlers(plugin)
self.active_plugins.remove(plugin)
app.settings.set_plugin_setting(plugin.manifest.short_name,
'active',
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/compare/2bdb296a66147ed4e52be52d77d434e12c57a6db...7857ebea0ae32984c40de704de05a90925ccd739
--
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/compare/2bdb296a66147ed4e52be52d77d434e12c57a6db...7857ebea0ae32984c40de704de05a90925ccd739
You're receiving this email because of your account on dev.gajim.org.
_______________________________________________
Commits mailing list
[email protected]
https://lists.gajim.org/cgi-bin/listinfo/commits