Skip to content
Permalink
Browse files
fix python plugin detection
git-svn-id: http://svn.osgeo.org/qgis/trunk@12721 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Jan 9, 2010
1 parent 74a4be8 commit 141606593614ac8445953cbcbb60b79e8f469f72
Showing with 9 additions and 2 deletions.
  1. +9 −2 python/utils.py
@@ -101,14 +101,21 @@ def uninstallConsoleHooks():
# list of plugins in plugin directory and home plugin directory
available_plugins = []

def findPlugins(path):
plugins = []
for plugin in glob.glob(path + "/plugins/*"):
if os.path.isdir(plugin):
plugins.append( os.path.basename(plugin) )

return plugins

def updateAvailablePlugins():
from qgis.core import QgsApplication
pythonPath = unicode(QgsApplication.pkgDataPath()) + "/python"
homePythonPath = unicode(QgsApplication.qgisSettingsDirPath()) + "/python"

plugins = map(os.path.basename, glob.glob(pythonPath + "/plugins/*"))
homePlugins = map(os.path.basename, glob.glob(homePythonPath + "/plugins/*"))
plugins = findPlugins( pythonPath )
homePlugins = findPlugins( homePythonPath )

# merge the lists
for p in homePlugins:

0 comments on commit 1416065

Please sign in to comment.