diff --git a/tasks/build.py b/tasks/build.py index 527758d..35b2149 100644 --- a/tasks/build.py +++ b/tasks/build.py @@ -381,19 +381,19 @@ def comment_download_pr(base_repo_name, pr, download_pr_exit_code, download_pr_e download_pr_comments_cfg = config.read_config()[config.SECTION_DOWNLOAD_PR_COMMENTS] if error_stage == _ERROR_GIT_CLONE: - download_comment = (f"`{download_pr_error}`\n" + download_comment = (f"```{download_pr_error}```\n" f"{download_pr_comments_cfg[config.DOWNLOAD_PR_COMMENTS_SETTING_GIT_CLONE_FAILURE]}" f"\n{download_pr_comments_cfg[config.DOWNLOAD_PR_COMMENTS_SETTING_GIT_CLONE_TIP]}") elif error_stage == _ERROR_GIT_CHECKOUT: - download_comment = (f"`{download_pr_error}`\n" + download_comment = (f"```{download_pr_error}```\n" f"{download_pr_comments_cfg[config.DOWNLOAD_PR_COMMENTS_SETTING_GIT_CHECKOUT_FAILURE]}" f"\n{download_pr_comments_cfg[config.DOWNLOAD_PR_COMMENTS_SETTING_GIT_CHECKOUT_TIP]}") elif error_stage == _ERROR_CURL: - download_comment = (f"`{download_pr_error}`\n" + download_comment = (f"```{download_pr_error}```\n" f"{download_pr_comments_cfg[config.DOWNLOAD_PR_COMMENTS_SETTING_CURL_FAILURE]}" f"\n{download_pr_comments_cfg[config.DOWNLOAD_PR_COMMENTS_SETTING_CURL_TIP]}") elif error_stage == _ERROR_GIT_APPLY: - download_comment = (f"`{download_pr_error}`\n" + download_comment = (f"```{download_pr_error}```\n" f"{download_pr_comments_cfg[config.DOWNLOAD_PR_COMMENTS_SETTING_GIT_APPLY_FAILURE]}" f"\n{download_pr_comments_cfg[config.DOWNLOAD_PR_COMMENTS_SETTING_GIT_APPLY_TIP]}") diff --git a/tasks/clean_up.py b/tasks/clean_up.py index 5853d00..8e2e509 100644 --- a/tasks/clean_up.py +++ b/tasks/clean_up.py @@ -43,7 +43,7 @@ def move_to_trash_bin(trash_bin_dir, job_dirs): # Remove event_xxx-yyy/run_nnn/ directories pr_dirs = list(set(pr_dirs)) # get only unique dirs for pr_dir in pr_dirs: - destination_dir = shutil.copy2(pr_dir, trash_bin_dir, follow_symlinks=True) + destination_dir = shutil.copytree(pr_dir, trash_bin_dir) log(f"{funcname}(): copied {pr_dir} to {destination_dir}") os.remove(pr_dir) log(f"{funcname}(): removed {pr_dir}")