From 22e5fb4f19ff6ef5927a51e97adb715a644b5ddf Mon Sep 17 00:00:00 2001 From: "John T. Wodder II" Date: Sun, 5 Nov 2023 14:54:40 -0500 Subject: [PATCH] Better way to suppress errors --- src/versioningit/hatch.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/versioningit/hatch.py b/src/versioningit/hatch.py index 2e55a28..027bd65 100644 --- a/src/versioningit/hatch.py +++ b/src/versioningit/hatch.py @@ -113,10 +113,7 @@ def initialize(self, _version: str, build_data: dict[str, Any]) -> None: def finalize( self, _version: str, _build_data: dict[str, Any], _artifact_path: str ) -> None: - try: - shutil.rmtree(self.__tmpdir) - except OSError: - pass + shutil.rmtree(self.__tmpdir, ignore_errors=True) @hookimpl