Skip to content

Commit

Permalink
fix #21774
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Apr 4, 2019
1 parent 81cfde2 commit eabf56b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
8 changes: 5 additions & 3 deletions python/pyplugin_installer/plugindependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
from configparser import NoOptionError, NoSectionError
from .version_compare import compareVersions
from . import installer as plugin_installer
from qgis.utils import updateAvailablePlugins
from qgis.utils import updateAvailablePlugins, plugins_metadata_parser


def __plugin_name_map(plugin_data_values):
Expand All @@ -28,7 +28,8 @@ def __plugin_name_map(plugin_data_values):
def __get_plugin_deps(plugin_id):

result = {}
parser = updateAvailablePlugins()[plugin_id]
updateAvailablePlugins()
parser = plugins_metadata_parser[plugin_id]
try:
plugin_deps = parser.get('general', 'plugin_dependencies')
except (NoOptionError, NoSectionError):
Expand Down Expand Up @@ -67,7 +68,8 @@ def find_dependencies(plugin_id, plugin_data=None, plugin_deps=None, installed_p
plugin_deps = __get_plugin_deps(plugin_id)

if installed_plugins is None:
metadata_parser = updateAvailablePlugins()
updateAvailablePlugins()
metadata_parser = plugins_metadata_parser
installed_plugins = {metadata_parser[k].get('general', 'name'): metadata_parser[k].get('general', 'version') for k, v in metadata_parser.items()}

if plugin_data is None:
Expand Down
1 change: 0 additions & 1 deletion python/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,6 @@ def updateAvailablePlugins():
available_plugins = plugins
global plugins_metadata_parser
plugins_metadata_parser = metadata_parser
return metadata_parser


def pluginMetadata(packageName, fct):
Expand Down

0 comments on commit eabf56b

Please sign in to comment.