diff --git a/constants.py b/constants.py index 0eada7f4ed16aa559fa65dc50093ee84de4318ff..40d76b56aa8fdedae3af981bf147819f3d1cc1ed 100644 --- a/constants.py +++ b/constants.py @@ -54,3 +54,6 @@ DELETE_ORGANISMS_TOOL = "toolshed.g2.bx.psu.edu/repos/gga/chado_organism_delete_ HOST_DATA_DIR='src_data' CONTAINER_DATA_DIR_ROOT='/project_data' + +REQUIRED_PARAMETERS = [CONF_ALL_HOSTNAME, CONF_ALL_HTTP_PORT, CONF_GALAXY_DEFAULT_ADMIN_EMAIL, CONF_GALAXY_DEFAULT_ADMIN_USER, + CONF_GALAXY_DEFAULT_ADMIN_PASSWORD, CONF_TRIPAL_PASSWORD, CONF_GALAXY_CONFIG_REMOTE_USER_MAILDOMAIN] diff --git a/utilities.py b/utilities.py index ff243568d60929fdcf781e30f78000bb91644e18..c6e7cfb7e23c6bcb2e5b0d418b05c6eb8448d57a 100755 --- a/utilities.py +++ b/utilities.py @@ -40,10 +40,7 @@ def parse_config(config_file): logging.critical("Config yaml file is not a dictionary (%s)" % config_file) sys.exit() else: - required_parameters = [constants.CONF_ALL_HOSTNAME, constants.CONF_ALL_HTTP_PORT, constants.CONF_GALAXY_DEFAULT_ADMIN_EMAIL, - constants.CONF_GALAXY_DEFAULT_ADMIN_USER, constants.CONF_GALAXY_DEFAULT_ADMIN_PASSWORD, constants.CONF_TRIPAL_PASSWORD, - constants.CONF_GALAXY_CONFIG_REMOTE_USER_MAILDOMAIN] - for required_parameter in required_parameters: + for required_parameter in constants.REQUIRED_PARAMETERS: if not config_dict[required_parameter]: logging.critical("{0} parameter improperly configured in config file {1}".format(required_parameter, config_file)) sys.exit()