Skip to content

Commit f36b403

Browse files
mbernasocchialexbruy
authored andcommittedOct 6, 2016
fix save to postgis table in processing
(cherry picked from commit 7c59e41)
1 parent 0e3c3a0 commit f36b403

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed
 

‎python/plugins/processing/tools/postgis.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,7 @@ def __init__(self, host=None, port=None, dbname=None, user=None,
181181
passwd=None, service=None, uri=None):
182182
# Regular expression for identifiers without need to quote them
183183
self.re_ident_ok = re.compile(r"^\w+$")
184+
port = str(port)
184185

185186
if uri:
186187
self.uri = uri
@@ -194,7 +195,7 @@ def __init__(self, host=None, port=None, dbname=None, user=None,
194195
conninfo = self.uri.connectionInfo(False)
195196
err = None
196197
for i in range(4):
197-
expandedConnInfo = uri.connectionInfo(True)
198+
expandedConnInfo = self.uri.connectionInfo(True)
198199
try:
199200
self.con = psycopg2.connect(expandedConnInfo.encode('utf-8'))
200201
if err is not None:

0 commit comments

Comments
 (0)
Please sign in to comment.