From 2fc418016f7463fbae2dd730ed3701ef57df429e Mon Sep 17 00:00:00 2001 From: Sandro Santilli Date: Tue, 18 Oct 2016 11:43:25 +0200 Subject: [PATCH] [processing] Fix handling of None shapeEncoding Fixes #15719 -- object of type 'NoneType' has no len() --- python/plugins/processing/algs/gdal/ogr2ogrtopostgislist.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/plugins/processing/algs/gdal/ogr2ogrtopostgislist.py b/python/plugins/processing/algs/gdal/ogr2ogrtopostgislist.py index 93c83cbaf6b..8f8e9660de4 100644 --- a/python/plugins/processing/algs/gdal/ogr2ogrtopostgislist.py +++ b/python/plugins/processing/algs/gdal/ogr2ogrtopostgislist.py @@ -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 + '"')