Skip to content

Commit 35f7839

Browse files
committed
Avoid .encode('utf8') call too
Was tested with python2, let's see if it fixes python3 too
1 parent 50641f7 commit 35f7839

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

python/plugins/db_manager/db_plugins/postgis/connector.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def __init__(self, uri):
6060

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

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

0 commit comments

Comments
 (0)