From a83c0cfc5b1410ada3d8c54b32d3904adf3ab8f8 Mon Sep 17 00:00:00 2001 From: xudan Date: Sat, 26 Nov 2016 08:19:21 +0000 Subject: dovetail tool: run.py execution always wipes of results files 1. move function clean_results_dir() into run.py 2. call this function at the beginning of function main() 3. this can only work correctly after all log initializations packaged, see JIRA: DOVETAIL-56 and gerrit https://gerrit.opnfv.org/gerrit/#/c/24059/ JIRA: DOVETAIL-80 Change-Id: I1cdda8f6d43f21c45c0537868cb7ed10d14ea9df Signed-off-by: xudan --- dovetail/utils/dovetail_logger.py | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'dovetail/utils/dovetail_logger.py') diff --git a/dovetail/utils/dovetail_logger.py b/dovetail/utils/dovetail_logger.py index e725e612..8afa08a1 100644 --- a/dovetail/utils/dovetail_logger.py +++ b/dovetail/utils/dovetail_logger.py @@ -25,16 +25,6 @@ import logging import os from conf.dovetail_config import DovetailConfig as dt_config -import dovetail_utils as dt_utils - - -def clean_results_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) - -clean_results_dir() class Logger: -- cgit 1.2.3-korg