Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[processing] some minor improvements in script algorithm
  • Loading branch information
volaya committed Jun 8, 2014
1 parent 5f42a2f commit 7f11ca4
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions python/plugins/processing/script/ScriptAlgorithm.py
Expand Up @@ -185,7 +185,7 @@ def processParameterLine(self, line):
found = True
break
if found:
param = ParameterTableField(tokens[0], tokens[0], field)
param = ParameterTableField(tokens[0], desc, field)
elif tokens[1].lower().strip().startswith('string'):
default = tokens[1].strip()[len('string') + 1:]
param = ParameterString(tokens[0], desc, default)
Expand All @@ -207,6 +207,9 @@ def processParameterLine(self, line):
out = OutputHTML()
elif tokens[1].lower().strip().startswith('output file'):
out = OutputFile()
subtokens = tokens[1].split(' ')
if len(subtokens > 2):
out.ext = subtokens[2]
elif tokens[1].lower().strip().startswith('output directory'):
out = OutputDirectory()
elif tokens[1].lower().strip().startswith('output number'):
Expand All @@ -218,7 +221,7 @@ def processParameterLine(self, line):
self.addParameter(param)
elif out is not None:
out.name = tokens[0]
out.description = tokens[0]
out.description = desc
self.addOutput(out)
else:
raise WrongScriptException('Could not load script:'
Expand Down

0 comments on commit 7f11ca4

Please sign in to comment.