Skip to content
Browse files
Merge pull request #9970 from elpaso/bugfix-fix-plugin-deps
Fix plugin dependencies
  • Loading branch information
elpaso committed May 10, 2019
2 parents 9a612d4 + 46a4435 commit d174840
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
@@ -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, metadataParser

def __plugin_name_map(plugin_data_values):
@@ -29,8 +29,7 @@ def __get_plugin_deps(plugin_id):
result = {}
global plugins_metadata_parser
parser = plugins_metadata_parser[plugin_id]
parser = metadataParser()[plugin_id]
plugin_deps = parser.get('general', 'plugin_dependencies')
except (NoOptionError, NoSectionError, KeyError):
return result
@@ -68,9 +67,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:
global plugins_metadata_parser
metadata_parser = plugins_metadata_parser
metadata_parser = metadataParser()
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:
@@ -265,6 +265,11 @@ def findPlugins(path):
yield (pluginName, cp)

def metadataParser():
"""Used by other modules to access the local parser object"""
return plugins_metadata_parser

def updateAvailablePlugins():
""" Go through the plugin_paths list and find out what plugins are available. """
# merge the lists

0 comments on commit d174840

Please sign in to comment.