Skip to content
Permalink
Browse files

[Plugin Installer] Only test not loaded Python plugins when (re)build…

…ing metadata registry. Loaded plugins prove they are ok just being loaded. It prevents possible bugs when already loaded plugin is imported again.
  • Loading branch information
borysiasty committed Jun 27, 2013
1 parent 52bb2c0 commit 7f99708c1746d811316b438ab95376519f6c8c49
Showing with 4 additions and 2 deletions.
  1. +4 −2 python/pyplugin_installer/installer_data.py
@@ -687,7 +687,8 @@ def getAllInstalled(self, testLoad=True):
for key in pluginDir.entryList():
key = unicode(key)
if not key in [".",".."]:
self.localCache[key] = self.getInstalledPlugin(key, readOnly=True, testLoad=False)
# only test those not yet loaded. Others proved they're o.k.
self.localCache[key] = self.getInstalledPlugin(key, readOnly=True, testLoad=testLoad and not qgis.utils.plugins.has_key(key))
except:
# return QCoreApplication.translate("QgsPluginInstaller","Couldn't open the system plugin directory")
pass # it's not necessary to stop due to this error
@@ -703,7 +704,8 @@ def getAllInstalled(self, testLoad=True):
for key in pluginDir.entryList():
key = unicode(key)
if not key in [".",".."]:
plugin = self.getInstalledPlugin(key, readOnly=False, testLoad=testLoad)
# only test those not yet loaded. Others proved they're o.k.
plugin = self.getInstalledPlugin(key, readOnly=False, testLoad=testLoad and not qgis.utils.plugins.has_key(key))
if key in self.localCache.keys() and compareVersions(self.localCache[key]["version_installed"],plugin["version_installed"]) == 1:
# An obsolete plugin in the "user" location is masking a newer one in the "system" location!
self.obsoletePlugins += [key]

0 comments on commit 7f99708

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