diff options
author | xudan <xudan16@huawei.com> | 2016-11-09 06:26:11 +0000 |
---|---|---|
committer | xudan <xudan16@huawei.com> | 2016-11-17 01:23:37 +0000 |
commit | 95720ae350260753788dbc92b7d35482165ceb48 (patch) | |
tree | 7db03ede2ec561be457869311a251dda367af8af /dovetail/utils/dovetail_logger.py | |
parent | 8a6bc92ff3b906a72194c7fa5db61ebb030052a4 (diff) |
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 <xudan16@huawei.com>
Diffstat (limited to 'dovetail/utils/dovetail_logger.py')
-rw-r--r-- | dovetail/utils/dovetail_logger.py | 6 |
1 files changed, 3 insertions, 3 deletions
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')) |