Skip to content
Permalink
Browse files

formatting fixes

  • Loading branch information
alexbruy committed Feb 24, 2015
1 parent 24811af commit be07f239e9b8023349bf7f907c616de2d5d0dd1c
Showing with 9 additions and 8 deletions.
  1. +9 −8 python/plugins/processing/algs/gdal/ogr2ogrtabletopostgislist.py
@@ -85,7 +85,8 @@ def defineCharacteristics(self):
self.addParameter(ParameterString(self.PK,
self.tr('Primary key'), 'id', optional=True))
self.addParameter(ParameterTableField(self.PRIMARY_KEY,
self.tr('Primary key (existing field, used if the above option is left empty)'), self.INPUT_LAYER, optional=True))
self.tr('Primary key (existing field, used if the above option is left empty)'),
self.INPUT_LAYER, optional=True))
self.addParameter(ParameterString(self.WHERE,
self.tr('Select features using a SQL "WHERE" statement (Ex: column="value")'),
'', optional=True))
@@ -148,12 +149,12 @@ def processAlgorithm(self, progress):
arguments.append('port=')
arguments.append(port)
if len(dbname) > 0:
arguments.append('dbname='+dbname)
arguments.append('dbname=' + dbname)
if len(password) > 0:
arguments.append('password='+password)
arguments.append('user='+user+'"')
arguments.append('password=' + password)
arguments.append('user=' + user + '"')
arguments.append(ogrLayer)
arguments.append('-nlt NONE')
arguments.append('-nlt NONE')
arguments.append(self.ogrLayerName(inLayer))
if launder:
arguments.append(launderstring)
@@ -167,7 +168,7 @@ def processAlgorithm(self, progress):
arguments.append(schemastring)
if len(pk) > 0:
arguments.append(pkstring)
elif primary_key != None:
elif primary_key is not None:
arguments.append("-lco FID="+primary_key)
if len(table) > 0:
arguments.append('-nln')
@@ -179,7 +180,7 @@ def processAlgorithm(self, progress):
if len(gt) > 0:
arguments.append('-gt')
arguments.append(gt)
if precision is False:
if not precision:
arguments.append('-lco PRECISION=NO')
if len(options) > 0:
arguments.append(options)
@@ -191,4 +192,4 @@ def processAlgorithm(self, progress):
else:
commands = ['ogr2ogr', GdalUtils.escapeAndJoin(arguments)]

GdalUtils.runGdal(commands, progress)
GdalUtils.runGdal(commands, progress)

0 comments on commit be07f23

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