Skip to content

Commit 43797ae

Browse files
author
jef
committed
fix python plugin detection
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@12721 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 2d21833 commit 43797ae

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

python/utils.py

+9-2
Original file line numberDiff line numberDiff line change
@@ -101,14 +101,21 @@ def uninstallConsoleHooks():
101101
# list of plugins in plugin directory and home plugin directory
102102
available_plugins = []
103103

104+
def findPlugins(path):
105+
plugins = []
106+
for plugin in glob.glob(path + "/plugins/*"):
107+
if os.path.isdir(plugin):
108+
plugins.append( os.path.basename(plugin) )
109+
110+
return plugins
104111

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

110-
plugins = map(os.path.basename, glob.glob(pythonPath + "/plugins/*"))
111-
homePlugins = map(os.path.basename, glob.glob(homePythonPath + "/plugins/*"))
117+
plugins = findPlugins( pythonPath )
118+
homePlugins = findPlugins( homePythonPath )
112119

113120
# merge the lists
114121
for p in homePlugins:

0 commit comments

Comments
 (0)