Skip to content
Permalink
Browse files

[processing] Fix connection to postgis

  • Loading branch information
arnaud-morvan committed Nov 6, 2016
1 parent e426dbc commit 8b8bc26ee00fb4049cfdae26af6fd80f8649529f
Showing with 4 additions and 1 deletion.
  1. +4 −1 python/plugins/processing/tools/postgis.py
@@ -59,6 +59,9 @@ def uri_from_name(conn_name):

settings.endGroup()

if hasattr(authcfg, 'isNull') and authcfg.isNull():
authcfg = ''

if service:
uri.setConnection(service, database, username, password, sslmode, authcfg)
else:
@@ -202,7 +205,7 @@ def __init__(self, host=None, port=None, dbname=None, user=None,
for i in range(4):
expandedConnInfo = self.uri.connectionInfo(True)
try:
self.con = psycopg2.connect(expandedConnInfo.encode('utf-8'))
self.con = psycopg2.connect(expandedConnInfo)
if err is not None:
QgsCredentials.instance().put(conninfo,
self.uri.username(),

0 comments on commit 8b8bc26

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