From eeeaa9d324b79141d2f91b36dd2462b2b2b6d731 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Rowlands=20=28=EB=B3=80=EA=B8=B0=ED=98=B8=29?= Date: Mon, 8 Feb 2021 16:30:24 +0900 Subject: [PATCH] exp: cleanup executor temp directories ourselves (#5425) --- dvc/repo/experiments/executor/local.py | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/dvc/repo/experiments/executor/local.py b/dvc/repo/experiments/executor/local.py index 52ac6acb7..f584799a0 100644 --- a/dvc/repo/experiments/executor/local.py +++ b/dvc/repo/experiments/executor/local.py @@ -1,6 +1,5 @@ import logging import os -import sys from tempfile import TemporaryDirectory from typing import Optional @@ -56,11 +55,4 @@ class TempDirExecutor(BaseLocalExecutor): def cleanup(self): super().cleanup() logger.debug("Removing tmpdir '%s'", self._tmp_dir) - try: - self._tmp_dir.cleanup() - except PermissionError: - if os.name == "nt" and sys.version_info < (3, 8): - # see https://bugs.python.org/issue26660 - remove(self._tmp_dir.name) - return - raise + remove(self._tmp_dir.name)