File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
python/plugins/processing/algs/saga Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -87,8 +87,9 @@ def _loadAlgorithms(self):
87
87
self .tr ('Problem with SAGA installation: SAGA was not found or is not correctly installed' ))
88
88
return
89
89
if version not in self .supportedVersions :
90
- if version > self .supportedVersions .keys ()[- 1 ]:
91
- version = self .supportedVersions .keys ()[- 1 ]
90
+ lastVersion = sorted (self .supportedVersions .keys ())[- 1 ]
91
+ if version > lastVersion :
92
+ version = lastVersion
92
93
else :
93
94
ProcessingLog .addToLog (ProcessingLog .LOG_ERROR ,
94
95
self .tr ('Problem with SAGA installation: installed SAGA version (%s) is not supported' % version ))
@@ -99,12 +100,12 @@ def _loadAlgorithms(self):
99
100
for descriptionFile in os .listdir (folder ):
100
101
if descriptionFile .endswith ('txt' ):
101
102
f = os .path .join (folder , descriptionFile )
102
- self ._loadAlgorithm (f )
103
+ self ._loadAlgorithm (f , version )
103
104
self .algs .append (SplitRGBBands ())
104
105
105
- def _loadAlgorithm (self , descriptionFile ):
106
+ def _loadAlgorithm (self , descriptionFile , version ):
106
107
try :
107
- alg = self .supportedVersions [SagaUtils . getSagaInstalledVersion () ][1 ](descriptionFile )
108
+ alg = self .supportedVersions [version ][1 ](descriptionFile )
108
109
if alg .name .strip () != '' :
109
110
self .algs .append (alg )
110
111
else :
You can’t perform that action at this time.
0 commit comments