Skip to content
Snippets Groups Projects
Commit 8432d11b authored by Arthur Le Bars's avatar Arthur Le Bars
Browse files

REQUIRED_PARAMETERS variable added to constants.py

parent c55f9210
No related branches found
No related tags found
2 merge requests!21Check required config param are not empty,!18Release v2.1.0
This commit is part of merge request !18. Comments created here will be created in the context of that merge request.
......@@ -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]
......@@ -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()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment