From 20ba28a086e9097c4d44f9e01c8df8bf85f41d3e Mon Sep 17 00:00:00 2001 From: hokor Date: Thu, 23 May 2024 18:47:23 +0800 Subject: [PATCH] fix: clean-alluredir FileNotFoundError when run test with xdist (#809) --- allure-python-commons/src/logger.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/allure-python-commons/src/logger.py b/allure-python-commons/src/logger.py index d0ac1e24..55f956f2 100644 --- a/allure-python-commons/src/logger.py +++ b/allure-python-commons/src/logger.py @@ -15,7 +15,7 @@ class AllureFileLogger: def __init__(self, report_dir, clean=False): self._report_dir = Path(report_dir).absolute() if self._report_dir.is_dir() and clean: - shutil.rmtree(self._report_dir) + shutil.rmtree(self._report_dir, ignore_errors=True) self._report_dir.mkdir(parents=True, exist_ok=True) def _report_item(self, item):