mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-16 18:25:12 -06:00
Python 2.6 support fixes.
This commit is contained in:
parent
d6d8a2348e
commit
b77c5a6c54
@ -27,3 +27,4 @@ speaklater==1.3
|
|||||||
pycrypto==2.6.1
|
pycrypto==2.6.1
|
||||||
wsgiref==0.1.2
|
wsgiref==0.1.2
|
||||||
simplejson==3.6.5
|
simplejson==3.6.5
|
||||||
|
importlib==1.0.3
|
||||||
|
@ -79,8 +79,8 @@ class PgAdmin(Flask):
|
|||||||
for module in self.submodules:
|
for module in self.submodules:
|
||||||
for key, value in module.menu_items.items():
|
for key, value in module.menu_items.items():
|
||||||
menu_items[key].extend(value)
|
menu_items[key].extend(value)
|
||||||
menu_items = {key: sorted(values, key=attrgetter('priority'))
|
menu_items = dict((key, sorted(value, key=attrgetter('priority')))
|
||||||
for key, values in menu_items.items()}
|
for key, value in menu_items.items())
|
||||||
return menu_items
|
return menu_items
|
||||||
|
|
||||||
|
|
||||||
|
@ -325,9 +325,9 @@ class ServerNode(PGChildNodeView):
|
|||||||
not_allowed = {}
|
not_allowed = {}
|
||||||
|
|
||||||
if conn.connected():
|
if conn.connected():
|
||||||
for arg in {
|
for arg in (
|
||||||
'host', 'port', 'db', 'username', 'sslmode', 'role'
|
'host', 'port', 'db', 'username', 'sslmode', 'role'
|
||||||
}:
|
):
|
||||||
if arg in data:
|
if arg in data:
|
||||||
return forbidden(
|
return forbidden(
|
||||||
errormsg=gettext(
|
errormsg=gettext(
|
||||||
@ -660,7 +660,6 @@ class ServerNode(PGChildNodeView):
|
|||||||
|
|
||||||
current_app.logger.info('Connection Established for server: \
|
current_app.logger.info('Connection Established for server: \
|
||||||
%s - %s' % (server.id, server.name))
|
%s - %s' % (server.id, server.name))
|
||||||
|
|
||||||
return make_json_response(
|
return make_json_response(
|
||||||
success=1,
|
success=1,
|
||||||
info=gettext("Server Connected."),
|
info=gettext("Server Connected."),
|
||||||
|
@ -90,6 +90,6 @@ class PgAdminModule(Blueprint):
|
|||||||
for module in self.submodules:
|
for module in self.submodules:
|
||||||
for key, value in module.menu_items.items():
|
for key, value in module.menu_items.items():
|
||||||
menu_items[key].extend(value)
|
menu_items[key].extend(value)
|
||||||
menu_items = {key: sorted(values, key=attrgetter('priority'))
|
menu_items = dict((key, sorted(value, key=attrgetter('priority')))
|
||||||
for key, values in menu_items.items()}
|
for key, value in menu_items.items())
|
||||||
return menu_items
|
return menu_items
|
||||||
|
@ -372,7 +372,7 @@ Attempt to reconnect it failed with the below error:
|
|||||||
import copy
|
import copy
|
||||||
# Get Resultset Column Name, Type and size
|
# Get Resultset Column Name, Type and size
|
||||||
columns = cur.description and [
|
columns = cur.description and [
|
||||||
copy.deepcopy(desc.__dict__) for desc in cur.description
|
copy.deepcopy(desc._asdict()) for desc in cur.description
|
||||||
] or []
|
] or []
|
||||||
|
|
||||||
rows = []
|
rows = []
|
||||||
@ -414,7 +414,7 @@ Attempt to reconnect it failed with the below error:
|
|||||||
import copy
|
import copy
|
||||||
# Get Resultset Column Name, Type and size
|
# Get Resultset Column Name, Type and size
|
||||||
columns = cur.description and [
|
columns = cur.description and [
|
||||||
copy.deepcopy(desc.__dict__) for desc in cur.description
|
copy.deepcopy(desc._asdict()) for desc in cur.description
|
||||||
] or []
|
] or []
|
||||||
|
|
||||||
rows = []
|
rows = []
|
||||||
|
Loading…
Reference in New Issue
Block a user