Skip to content

Commit 7f11ca4

Browse files
committedJun 8, 2014
[processing] some minor improvements in script algorithm
1 parent 5f42a2f commit 7f11ca4

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed
 

‎python/plugins/processing/script/ScriptAlgorithm.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ def processParameterLine(self, line):
185185
found = True
186186
break
187187
if found:
188-
param = ParameterTableField(tokens[0], tokens[0], field)
188+
param = ParameterTableField(tokens[0], desc, field)
189189
elif tokens[1].lower().strip().startswith('string'):
190190
default = tokens[1].strip()[len('string') + 1:]
191191
param = ParameterString(tokens[0], desc, default)
@@ -207,6 +207,9 @@ def processParameterLine(self, line):
207207
out = OutputHTML()
208208
elif tokens[1].lower().strip().startswith('output file'):
209209
out = OutputFile()
210+
subtokens = tokens[1].split(' ')
211+
if len(subtokens > 2):
212+
out.ext = subtokens[2]
210213
elif tokens[1].lower().strip().startswith('output directory'):
211214
out = OutputDirectory()
212215
elif tokens[1].lower().strip().startswith('output number'):
@@ -218,7 +221,7 @@ def processParameterLine(self, line):
218221
self.addParameter(param)
219222
elif out is not None:
220223
out.name = tokens[0]
221-
out.description = tokens[0]
224+
out.description = desc
222225
self.addOutput(out)
223226
else:
224227
raise WrongScriptException('Could not load script:'

0 commit comments

Comments
 (0)
Please sign in to comment.