mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-13 00:03:09 -04:00
fix python plugin detection
git-svn-id: http://svn.osgeo.org/qgis/trunk@12721 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
parent
74a4be85e8
commit
1416065936
@ -101,14 +101,21 @@ active_plugins = []
|
||||
# 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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user