Skip to content

Commit be07f23

Browse files
committedFeb 24, 2015
formatting fixes
1 parent 24811af commit be07f23

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed
 

‎python/plugins/processing/algs/gdal/ogr2ogrtabletopostgislist.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,8 @@ def defineCharacteristics(self):
8585
self.addParameter(ParameterString(self.PK,
8686
self.tr('Primary key'), 'id', optional=True))
8787
self.addParameter(ParameterTableField(self.PRIMARY_KEY,
88-
self.tr('Primary key (existing field, used if the above option is left empty)'), self.INPUT_LAYER, optional=True))
88+
self.tr('Primary key (existing field, used if the above option is left empty)'),
89+
self.INPUT_LAYER, optional=True))
8990
self.addParameter(ParameterString(self.WHERE,
9091
self.tr('Select features using a SQL "WHERE" statement (Ex: column="value")'),
9192
'', optional=True))
@@ -148,12 +149,12 @@ def processAlgorithm(self, progress):
148149
arguments.append('port=')
149150
arguments.append(port)
150151
if len(dbname) > 0:
151-
arguments.append('dbname='+dbname)
152+
arguments.append('dbname=' + dbname)
152153
if len(password) > 0:
153-
arguments.append('password='+password)
154-
arguments.append('user='+user+'"')
154+
arguments.append('password=' + password)
155+
arguments.append('user=' + user + '"')
155156
arguments.append(ogrLayer)
156-
arguments.append('-nlt NONE')
157+
arguments.append('-nlt NONE')
157158
arguments.append(self.ogrLayerName(inLayer))
158159
if launder:
159160
arguments.append(launderstring)
@@ -167,7 +168,7 @@ def processAlgorithm(self, progress):
167168
arguments.append(schemastring)
168169
if len(pk) > 0:
169170
arguments.append(pkstring)
170-
elif primary_key != None:
171+
elif primary_key is not None:
171172
arguments.append("-lco FID="+primary_key)
172173
if len(table) > 0:
173174
arguments.append('-nln')
@@ -179,7 +180,7 @@ def processAlgorithm(self, progress):
179180
if len(gt) > 0:
180181
arguments.append('-gt')
181182
arguments.append(gt)
182-
if precision is False:
183+
if not precision:
183184
arguments.append('-lco PRECISION=NO')
184185
if len(options) > 0:
185186
arguments.append(options)
@@ -191,4 +192,4 @@ def processAlgorithm(self, progress):
191192
else:
192193
commands = ['ogr2ogr', GdalUtils.escapeAndJoin(arguments)]
193194

194-
GdalUtils.runGdal(commands, progress)
195+
GdalUtils.runGdal(commands, progress)

0 commit comments

Comments
 (0)
Please sign in to comment.