From f01affee7f12d223ef3138e09d5198763a36d598 Mon Sep 17 00:00:00 2001 From: Evan Felix Date: Thu, 13 Jul 2023 16:59:44 -0700 Subject: [PATCH] Update _mockings.py to fix bug created in #3390 This moves us back to an rmdir for removing directories, since unlink with never work for the directories --- src/ansiblelint/_mockings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ansiblelint/_mockings.py b/src/ansiblelint/_mockings.py index e0482b7722..4004e273e1 100644 --- a/src/ansiblelint/_mockings.py +++ b/src/ansiblelint/_mockings.py @@ -122,4 +122,4 @@ def _perform_mockings_cleanup(options: Options) -> None: else: path = options.cache_dir / "roles" / role_name with contextlib.suppress(OSError): - path.unlink() + path.rmdir()