Skip to content
Permalink
Browse files

Avoid .encode('utf8') call too

Was tested with python2, let's see if it fixes python3 too
  • Loading branch information
strk committed Jun 6, 2017
1 parent 50641f7 commit 35f7839f7525401304ab0e2daf80a36bd43ea01e
Showing with 2 additions and 2 deletions.
  1. +2 −2 python/plugins/db_manager/db_plugins/postgis/connector.py
@@ -60,7 +60,7 @@ def __init__(self, uri):

expandedConnInfo = self._connectionInfo()
try:
self.connection = psycopg2.connect(expandedConnInfo.encode('utf-8'))
self.connection = psycopg2.connect(expandedConnInfo)
except self.connection_error_types() as e:
err = unicode(e)
uri = self.uri()
@@ -79,7 +79,7 @@ def __init__(self, uri):

newExpandedConnInfo = uri.connectionInfo(True)
try:
self.connection = psycopg2.connect(newExpandedConnInfo.encode('utf-8'))
self.connection = psycopg2.connect(newExpandedConnInfo)
QgsCredentials.instance().put(conninfo, username, password)
except self.connection_error_types() as e:
if i == 2:

0 comments on commit 35f7839

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