Skip to content
Permalink
Browse files

Merge pull request #9762 from elpaso/plugin-dependencies-fix

Fix plugin loading from zip (dependencies followup)
  • Loading branch information
m-kuhn committed Apr 9, 2019
2 parents b2aa978 + e57d1e0 commit ae17fb3f5367cf61a9fff2b1790f3e0fd6e3fb2c
Showing with 5 additions and 4 deletions.
  1. +4 −4 python/pyplugin_installer/plugindependencies.py
  2. +1 −0 python/utils.py
@@ -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, plugins_metadata_parser
from qgis.utils import updateAvailablePlugins


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

result = {}
updateAvailablePlugins()
parser = plugins_metadata_parser[plugin_id]
metadata_parser = updateAvailablePlugins()
parser = metadata_parser[plugin_id]
try:
plugin_deps = parser.get('general', 'plugin_dependencies')
except (NoOptionError, NoSectionError):
@@ -69,7 +69,7 @@ def find_dependencies(plugin_id, plugin_data=None, plugin_deps=None, installed_p

if installed_plugins is None:
updateAvailablePlugins()
metadata_parser = plugins_metadata_parser
metadata_parser = updateAvailablePlugins()
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:
@@ -282,6 +282,7 @@ def updateAvailablePlugins():
available_plugins = plugins
global plugins_metadata_parser
plugins_metadata_parser = metadata_parser
return metadata_parser


def pluginMetadata(packageName, fct):

0 comments on commit ae17fb3

Please sign in to comment.
You can’t perform that action at this time.