remove unused variable

fix tests
This commit is contained in:
Alexander Bruy 2019-11-02 12:26:52 +02:00 committed by Nyall Dawson
parent 74d6e099e6
commit 3701d360a1
2 changed files with 2 additions and 4 deletions

View File

@ -256,10 +256,8 @@ class gdalcalc(GdalAlgorithm):
options = self.parameterAsString(parameters, self.OPTIONS, context)
if options:
parts = options.split('|')
options = []
for p in parts:
option = '--co ' + p
arguments.append(option)
arguments.append('--co ' + p)
if self.EXTRA in parameters and parameters[self.EXTRA] not in (None, ''):
extra = self.parameterAsString(parameters, self.EXTRA, context)

View File

@ -601,7 +601,7 @@ class TestGdalRasterAlgorithms(unittest.TestCase, AlgorithmsTestBase.AlgorithmsT
'OPTIONS': 'COMPRESS=JPEG|JPEG_QUALITY=75',
'OUTPUT': output}, context, feedback),
['gdal_calc.py',
'--calc "{}" --format JPEG --type Float32 -A {} --A_band 1 -co COMPRESS=JPEG -co JPEG_QUALITY=75 --outfile {}'.format(formula, source, output)])
'--calc "{}" --format JPEG --type Float32 -A {} --A_band 1 --co COMPRESS=JPEG --co JPEG_QUALITY=75 --outfile {}'.format(formula, source, output)])
# additional parameters
formula = 'A*2'