Skip to content

Commit

Permalink
Fix parsing of saga params
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson authored and alexbruy committed Nov 9, 2017
1 parent b928cc6 commit 85b8502
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions python/plugins/processing/algs/saga/SagaAlgorithm.py
Expand Up @@ -78,9 +78,11 @@ def createInstance(self):
return SagaAlgorithm(self.description_file)

def initAlgorithm(self, config=None):
#for p in self.params:
# self.addParameter(p)
pass
for p in self.params:
try:
self.addParameter(p)
except:
pass # todo - remove

def name(self):
return self._name
Expand Down Expand Up @@ -122,7 +124,7 @@ def defineCharacteristicsFromFile(self):
while line != '':
if line.startswith('Hardcoded'):
self.hardcoded_strings.append(line[len('Hardcoded|'):])
elif line.startswith('Parameter'):
elif line.startswith('QgsProcessingParameter') or line.startswith('Parameter'):
self.params.append(getParameterFromString(line))
elif line.startswith('AllowUnmatching'):
self.allow_nonmatching_grid_extents = True
Expand Down

0 comments on commit 85b8502

Please sign in to comment.