Skip to content
Permalink
Browse files

[processing] encoding and indentation fixes

  • Loading branch information
volaya committed Jan 28, 2019
1 parent 8bbd559 commit 2895493cce41fa9a8b49cc1b2a824bc50bcd8bea
@@ -315,10 +315,10 @@ def processAlgorithm(self, parameters, context, feedback):
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 @@ def checkParameterValues(self, parameters, context):

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:
@@ -115,7 +115,7 @@ def test_non_ascii_output(self):
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,

0 comments on commit 2895493

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