Skip to content
Permalink
Browse files
[processing] some minor improvements in script algorithm
  • Loading branch information
volaya committed Jun 8, 2014
1 parent 5f42a2f commit 7f11ca4179942babd3c80dfeb7c7e8dd26cb58e5
Showing with 5 additions and 2 deletions.
  1. +5 −2 python/plugins/processing/script/ScriptAlgorithm.py
@@ -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)
@@ -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'):
@@ -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:'

0 comments on commit 7f11ca4

Please sign in to comment.