Remove Python2 references from the source code.

refs #5443

Initial patch: Neel Patel
This commit is contained in:
Akshay Joshi
2020-04-30 17:22:48 +05:30
parent 7dd00a1494
commit ad80217593
48 changed files with 143 additions and 537 deletions

View File

@@ -22,10 +22,6 @@ from pgadmin.utils.ajax import make_json_response, \
from pgadmin.utils.ajax import precondition_required
from pgadmin.utils.driver import get_driver
from config import PG_DEFAULT_DRIVER
from pgadmin.utils import IS_PY2
# If we are in Python3
if not IS_PY2:
unicode = str
class TablespaceModule(CollectionNodeModule):
@@ -365,7 +361,7 @@ class TablespaceView(PGChildNodeView):
try:
SQL, name = self.get_sql(gid, sid, data, tsid)
# Most probably this is due to error
if not isinstance(SQL, (str, unicode)):
if not isinstance(SQL, str):
return SQL
SQL = SQL.strip('\n').strip(' ')
@@ -460,7 +456,7 @@ class TablespaceView(PGChildNodeView):
sql, name = self.get_sql(gid, sid, data, tsid)
# Most probably this is due to error
if not isinstance(sql, (str, unicode)):
if not isinstance(sql, str):
return sql
sql = sql.strip('\n').strip(' ')