Skip to content
Permalink
Browse files

[Bugfix][Processing] Py and R scripts parsing file param

Need to be cherry-picked
  • Loading branch information
rldhont committed Mar 20, 2018
1 parent 153835e commit f281ff5f4c01f9f707c968081a2e9332738f5320
@@ -241,9 +241,12 @@ def processInputParameterToken(self, token, name):
param = ParameterTableField(name, desc, field)
elif token.lower().strip() == 'extent':
param = ParameterExtent(name, desc)
elif token.lower().strip() == 'file':
elif token.lower().strip().startswith('file'):
param = ParameterFile(name, desc, False)
elif token.lower().strip() == 'folder':
ext = token.strip()[len('file') + 1:]
if ext:
param.ext = ext
elif token.lower().strip().startswith('folder'):
param = ParameterFile(name, desc, True)
elif token.lower().strip().startswith('string'):
default = token.strip()[len('string') + 1:]
@@ -257,7 +260,7 @@ def processInputParameterToken(self, token, name):
param = ParameterString(name, desc, default, multiline=True)
else:
param = ParameterString(name, desc, multiline=True)
elif token.lower().strip() == 'crs':
elif token.lower().strip().startswith('crs'):
default = token.strip()[len('crs') + 1:]
if default:
param = ParameterCrs(name, desc, default)
@@ -225,9 +225,12 @@ def processInputParameterToken(self, token, name):
param = ParameterBoolean(name, descName)
elif token.lower().strip() == 'extent':
param = ParameterExtent(name, descName)
elif token.lower().strip() == 'file':
elif token.lower().strip().startswith('file'):
param = ParameterFile(name, descName, False)
elif token.lower().strip() == 'folder':
ext = token.strip()[len('file') + 1:]
if ext:
param.ext = ext
elif token.lower().strip().startswith('folder'):
param = ParameterFile(name, descName, True)
elif token.lower().strip().startswith('number'):
default = token.strip()[len('number') + 1:]

0 comments on commit f281ff5

Please sign in to comment.
You can’t perform that action at this time.