File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
python/plugins/processing/script Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -99,11 +99,14 @@ def loadAlgorithms(self):
9999 self .algs = []
100100 folders = ScriptUtils .scriptsFolders ()
101101 for folder in folders :
102- items = os .scandir (folder )
102+ items = [f for f in os .listdir (folder ) if os .path .isfile (os .path .join (folder , f ))]
103+ #items = os.scandir(folder)
103104 for entry in items :
104- if entry .name .lower ().endswith (".py" ) and entry .is_file ():
105- moduleName = os .path .splitext (entry .name )[0 ]
106- filePath = os .path .abspath (os .path .join (folder , entry .name ))
105+ if entry .lower ().endswith (".py" ):
106+ #if entry.name.lower().endswith(".py") and entry.is_file():
107+ #moduleName = os.path.splitext(entry.name)[0]
108+ moduleName = os .path .splitext (os .path .basename (entry ))[0 ]
109+ filePath = os .path .abspath (os .path .join (folder , entry ))
107110 alg = ScriptUtils .loadAlgorithm (moduleName , filePath )
108111 if alg is not None :
109112 self .algs .append (alg )
You can’t perform that action at this time.
0 commit comments