Skip to content

Commit

Permalink
Merge pull request #7747 from cjmayo/check_init_py
Browse files Browse the repository at this point in the history
Mark a Python plugin without an __init__.py as broken
  • Loading branch information
luipir committed Aug 30, 2018
2 parents d683550 + 051e4d1 commit a092823
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions python/pyplugin_installer/installer_data.py
Expand Up @@ -600,6 +600,10 @@ def pluginMetadata(fct):
errorDetails = ""
version = None

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

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

0 comments on commit a092823

Please sign in to comment.