[processing] encoding and indentation fixes

This commit is contained in:
volaya 2019-01-28 09:34:15 +01:00
parent 8bbd55943a
commit 2895493cce
2 changed files with 5 additions and 5 deletions

View File

@ -315,10 +315,10 @@ class SagaAlgorithm(SagaAlgorithmBase):
try:
filePath.encode('ascii')
except UnicodeEncodeError:
nonAsciiFilePath = filePath
nonAsciiFilePath = filePath
filePath = QgsProcessingUtils.generateTempFilename(out.name() + os.path.splitext(filePath)[1])
output_files_nonascii[filePath] = nonAsciiFilePath
output_files[out.name()] = filePath
command += ' -{} "{}"'.format(out.name(), filePath)
@ -442,8 +442,8 @@ class SagaAlgorithm(SagaAlgorithmBase):
if isinstance(param, QgsProcessingParameterRasterLayer):
raster_layer_params.append(param.name())
elif (isinstance(param, QgsProcessingParameterMultipleLayers) and
param.layerType() == QgsProcessing.TypeRaster):
elif (isinstance(param, QgsProcessingParameterMultipleLayers)
and param.layerType() == QgsProcessing.TypeRaster):
raster_layer_params.extend(param.name())
for layer_param in raster_layer_params:

View File

@ -115,7 +115,7 @@ class TestSagaAlgorithms(unittest.TestCase, AlgorithmsTestBase.AlgorithmsTest):
alg = QgsApplication.processingRegistry().createAlgorithmById('saga:fixeddistancebuffer')
self.assertIsNotNone(alg)
temp_file = os.path.join(self.temp_dir, 'non_ascii_ñññ.gpkg')
temp_file = os.path.join(self.temp_dir, 'non_ascii_ñññ.gpkg')
parameters = {'SHAPES':'testmem',
'DIST_FIELD_DEFAULT':5,
'NZONES':1,