File tree 1 file changed +9
-2
lines changed
1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -101,14 +101,21 @@ def uninstallConsoleHooks():
101
101
# list of plugins in plugin directory and home plugin directory
102
102
available_plugins = []
103
103
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
104
111
105
112
def updateAvailablePlugins ():
106
113
from qgis .core import QgsApplication
107
114
pythonPath = unicode (QgsApplication .pkgDataPath ()) + "/python"
108
115
homePythonPath = unicode (QgsApplication .qgisSettingsDirPath ()) + "/python"
109
116
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 )
112
119
113
120
# merge the lists
114
121
for p in homePlugins :
You can’t perform that action at this time.
0 commit comments