From 09b3e82f2a24b321463ada117def908357a350ed Mon Sep 17 00:00:00 2001 From: Diane Trout Date: Fri, 30 Jan 2009 01:51:50 +0000 Subject: [PATCH] Update to not hard code the config file name and the error message for when we don't find it --- htsworkflow/pipelines/configure_run.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/htsworkflow/pipelines/configure_run.py b/htsworkflow/pipelines/configure_run.py index 54677b8..ec6da51 100644 --- a/htsworkflow/pipelines/configure_run.py +++ b/htsworkflow/pipelines/configure_run.py @@ -5,8 +5,9 @@ import time import re import os -from htsworkflow.pipelines.retrieve_config import getCombinedOptions, saveConfigFile -from htsworkflow.pipelines.retrieve_config import FlowCellNotFound, WebError404 +from htsworkflow.pipelines.retrieve_config import \ + CONFIG_SYSTEM, CONFIG_USER, \ + FlowCellNotFound, getCombinedOptions, saveConfigFile, WebError404 from htsworkflow.pipelines.genome_mapper import DuplicateGenome, getAvailableGenomes, constructMapperDict from htsworkflow.pipelines.run_status import GARunStatus @@ -348,7 +349,8 @@ def pipeline_stderr_handler(line, conf_info): return False -def retrieve_config(conf_info, flowcell, cfg_filepath, genome_dir): +def retrieve_config(conf_info, flowcell, cfg_filepath, genome_dir, + cfg_defaults=None): """ Gets the config file from server... requires config file in: @@ -362,11 +364,11 @@ def retrieve_config(conf_info, flowcell, cfg_filepath, genome_dir): return True if successful, False is failure """ - options = getCombinedOptions() + options = getCombinedOptions(cfg_defaults) if options.url is None: - logging.error("~/.ga_frontend.conf or /etc/ga_frontend/ga_frontend.conf" \ - " missing base_host_url option") + logging.error("%s or %s missing base_host_url option" % \ + (CONFIG_USER, CONFIG_SYSTEM)) return False try: -- 2.30.2