Skip to content

Commit

Permalink
fix save to postgis table in processing
Browse files Browse the repository at this point in the history
(cherry picked from commit 7c59e41)
  • Loading branch information
mbernasocchi authored and alexbruy committed Oct 6, 2016
1 parent 0e3c3a0 commit f36b403
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion python/plugins/processing/tools/postgis.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ def __init__(self, host=None, port=None, dbname=None, user=None,
passwd=None, service=None, uri=None):
# Regular expression for identifiers without need to quote them
self.re_ident_ok = re.compile(r"^\w+$")
port = str(port)

if uri:
self.uri = uri
Expand All @@ -194,7 +195,7 @@ def __init__(self, host=None, port=None, dbname=None, user=None,
conninfo = self.uri.connectionInfo(False)
err = None
for i in range(4):
expandedConnInfo = uri.connectionInfo(True)
expandedConnInfo = self.uri.connectionInfo(True)
try:
self.con = psycopg2.connect(expandedConnInfo.encode('utf-8'))
if err is not None:
Expand Down

0 comments on commit f36b403

Please sign in to comment.