Commit 1a964175 authored by Cédric Traizet's avatar Cédric Traizet
Browse files

BUG: treat Parameter_RAM as an integer parameter in SetParameterValue (Swig Wrapper)

parent 8f8665bf
Pipeline #8006 passed with stages
in 122 minutes and 27 seconds
......@@ -656,8 +656,7 @@ class ApplicationProxy(object):
def SetParameterValue(self, paramKey, value):
paramType = self.GetParameterType(paramKey)
if paramType in [ParameterType_RAM,
ParameterType_String, ParameterType_InputFilename,
if paramType in [ParameterType_String, ParameterType_InputFilename,
ParameterType_OutputImage, ParameterType_OutputVectorData,
ParameterType_OutputFilename,
ParameterType_Directory, ParameterType_InputImage,
......@@ -667,7 +666,7 @@ class ApplicationProxy(object):
ParameterType_InputFilenameList, ParameterType_StringList,
ParameterType_ListView, ParameterType_Field, ParameterType_Band]:
return self.SetParameterStringList(paramKey, value)
elif paramType in [ParameterType_Int, ParameterType_Radius]:
elif paramType in [ParameterType_Int, ParameterType_Radius, ParameterType_RAM]:
return self.SetParameterInt(paramKey, value)
elif paramType in [ParameterType_Float]:
return self.SetParameterFloat(paramKey, value)
......
......@@ -107,11 +107,11 @@ def test(otb, argv):
cm_assert(app.GetParameterFloat('elev.default'), -2.5)
#18 - parameter ram get
app.SetParameterString('opt.ram', '256')
app.SetParameterInt('opt.ram', 256)
cm_assert(256, app.OPT.RAM)
#19 - parameter ram set
app.OPT.RAM = '512'
app.OPT.RAM = 512
cm_assert(app.GetParameterInt('opt.ram'), 512)
#20 - parameter bool set
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment