From 95720ae350260753788dbc92b7d35482165ceb48 Mon Sep 17 00:00:00 2001 From: xudan Date: Wed, 9 Nov 2016 06:26:11 +0000 Subject: dovetail tool: reorganize dovetail_config.py and modify related files 1. move all sentencs and functions into class DovetailConfig 2. delete dict container_config for it has been replaced by dovetail_config 2. modify files that import dovetail_config, including container.py, parser.py, report.py, run.py, dovetail_logger.py and testcase.py JIRA: DOVETAIL-55 Change-Id: Ib5ca3cadd751075c879f39e8cb2eb2e0adcef6aa Signed-off-by: xudan --- dovetail/utils/dovetail_logger.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'dovetail/utils/dovetail_logger.py') diff --git a/dovetail/utils/dovetail_logger.py b/dovetail/utils/dovetail_logger.py index 8be9c93f..6a2d38d5 100644 --- a/dovetail/utils/dovetail_logger.py +++ b/dovetail/utils/dovetail_logger.py @@ -24,12 +24,12 @@ import logging import os -from conf.dovetail_config import dovetail_config +from conf.dovetail_config import DovetailConfig as dt_config import dovetail_utils as dt_utils def clean_results_dir(): - result_path = dovetail_config['result_dir'] + result_path = dt_config.dovetail_config['result_dir'] if os.path.exists(result_path): cmd = 'sudo rm -rf %s/*' % (result_path) dt_utils.exec_cmd(cmd, exit_on_error=False) @@ -56,7 +56,7 @@ class Logger: ch.setLevel(logging.INFO) self.logger.addHandler(ch) - result_path = dovetail_config['result_dir'] + result_path = dt_config.dovetail_config['result_dir'] if not os.path.exists(result_path): os.makedirs(result_path) hdlr = logging.FileHandler(os.path.join(result_path, 'dovetail.log')) -- cgit 1.2.3-korg