from unicode to str

This commit is contained in:
Luigi Pirelli 2018-05-08 10:24:12 +02:00
parent 4f415c56e5
commit 8968b63efd

View File

@ -67,7 +67,7 @@ class PostGisDBConnector(DBConnector):
self.connection = psycopg2.connect(expandedConnInfo)
except self.connection_error_types() as e:
# get credentials if cached or asking to the user no more than 3 times
err = unicode(e)
err = str(e)
uri = self.uri()
conninfo = uri.connectionInfo(False)
@ -89,7 +89,7 @@ class PostGisDBConnector(DBConnector):
except self.connection_error_types() as e:
if i == 2:
raise ConnectionError(e)
err = unicode(e)
err = str(e)
finally:
# clear certs for each time trying to connect
self._clearSslTempCertsIfAny(newExpandedConnInfo)