Define the utility path lable, and help message for the Greenplum

database server, shown in the preferences dialog.

Also, fixed the issue, when server type is not defined in the
DEFAULT_BINARY_PATHS, in the configuration.
This commit is contained in:
Ashesh Vashi committed 2017-08-25 21:35:57 +05:30
1 parent 74db837417
commit 6b727c43b9
2 files changed
+10 -1

No files matched your search

@@ -12,6 +12,12 @@ from pgadmin.browser.server_groups.servers.types import ServerType
class GPDB(ServerType):
UTILITY_PATH_LABEL = gettext("Greenplum Database Binary Path")
UTILITY_PATH_HELP = gettext(
"Path to the directory containing the Greenplum Database utility"
" programs (pg_dump, pg_restore etc)."
)
def instanceOf(self, ver):
return "Greenplum Database" in ver
@@ -54,7 +54,10 @@ class ServerType(object):
for key in cls.registry:
st = cls.registry[key]
default_path = config.DEFAULT_BINARY_PATHS[st.stype] or ""
default_path = (
config.DEFAULT_BINARY_PATHS[st.stype] if st.stype in
config.DEFAULT_BINARY_PATHS else ""
) or ""
st.utility_path = paths.register(
'bin_paths', st.stype + '_bin_dir',