Skip to content
Browse files
Mark a Python plugin without an as broken
utils.findPlugins() checks for the existence of an which
results in an attempt to enable a plugin without an being
blocked with the only notification being a message in the Plugins log:

WARNING    Plugin "<name>" is not compatible with this version of QGIS.
             It will be disabled.

This is not very informative, especially because it is the same message
used for a metadata version mismatch.

Adding this check to Plugins.getInstalledPlugin(), which already
duplicates the metadata checks from utils.findPlugins(), results in the
plugin being marked as broken in the Plugins dialog.

(cherry picked from commit 051e4d1)
  • Loading branch information
cjmayo authored and nyalldawson committed Aug 31, 2018
1 parent f31a7f4 commit 60fed67069f153bdaee9e5545dd6b153d0d42e4b
Showing with 4 additions and 0 deletions.
  1. +4 −0 python/pyplugin_installer/
@@ -600,6 +600,10 @@ def pluginMetadata(fct):
errorDetails = ""
version = None

if not os.path.exists(os.path.join(path, '')):
error = "broken"
errorDetails = QCoreApplication.translate("QgsPluginInstaller", "Missing")

metadataFile = os.path.join(path, 'metadata.txt')
if os.path.exists(metadataFile):
version = normalizeVersion(pluginMetadata("version"))

0 comments on commit 60fed67

Please sign in to comment.