[processing] Fix handling of None shapeEncoding

Fixes #15719 -- object of type 'NoneType' has no len()
This commit is contained in:
Sandro Santilli 2016-10-18 11:43:25 +02:00
parent f0f70a5d9a
commit 2fc418016f

View File

@ -211,7 +211,7 @@ class Ogr2OgrToPostGisList(GdalAlgorithm):
arguments = []
arguments.append('-progress')
arguments.append('--config PG_USE_COPY YES')
if len(shapeEncoding) > 0:
if shapeEncoding:
arguments.append('--config')
arguments.append('SHAPE_ENCODING')
arguments.append('"' + shapeEncoding + '"')