From e445aa1a633dd562af867d0c27c18d7a12f2d325 Mon Sep 17 00:00:00 2001 From: hokor Date: Thu, 18 Apr 2024 21:16:48 +0800 Subject: [PATCH] fix: clean-alluredir FileNotFoundError when run test with xdist --- 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):