Skip to content
Snippets Groups Projects
Commit aa19e472 authored by Weblate's avatar Weblate
Browse files

[plugin_installer] do not update plugin if it's not compatible with current...

[plugin_installer] do not update plugin if it's not compatible with current Gajim version. Fixes #225
parent 1c8c8008
No related branches found
No related tags found
No related merge requests found
[info]
name: Plugin Installer
short_name: plugin_installer
version: 0.12.2
version: 0.12.3
description: Install and upgrade plugins from HTTPS
authors: Denis Fomin <fominde@gmail.com>
Yann Leboulanger <asterix@lagaule.org>
......
......@@ -223,7 +223,14 @@ class PluginInstaller(GajimPlugin):
local = convert_version_to_list(local_version)
remote = convert_version_to_list(config.get('info',
'version'))
if remote > local:
gajim_v = convert_version_to_list(gajim.config.get(
'version'))
min_v = config.get('info', 'min_gajim_version')
min_v = convert_version_to_list(min_v) if min_v else gajim_v
max_v = config.get('info', 'max_gajim_version')
max_v = convert_version_to_list(max_v) if max_v else gajim_v
if (remote > local) and (gajim_v >= min_v) and \
(gajim_v <= max_v):
to_update.append(config.get('info', 'name'))
gobject.idle_add(self.warn_update, to_update)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment