Skip to content

Commit 9a9df32

Browse files
authored
Merge pull request #3574 from mbernasocchi/master
[processing] fix save to postgis table
2 parents dcdf91b + 7c59e41 commit 9a9df32

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
@@ -186,6 +186,7 @@ def __init__(self, host=None, port=None, dbname=None, user=None,
186186
passwd=None, service=None, uri=None):
187187
# Regular expression for identifiers without need to quote them
188188
self.re_ident_ok = re.compile(r"^\w+$")
189+
port = str(port)
189190

190191
if uri:
191192
self.uri = uri
@@ -199,7 +200,7 @@ def __init__(self, host=None, port=None, dbname=None, user=None,
199200
conninfo = self.uri.connectionInfo(False)
200201
err = None
201202
for i in range(4):
202-
expandedConnInfo = uri.connectionInfo(True)
203+
expandedConnInfo = self.uri.connectionInfo(True)
203204
try:
204205
self.con = psycopg2.connect(expandedConnInfo.encode('utf-8'))
205206
if err is not None:

0 commit comments

Comments
 (0)