From 09285e019d35e4cbb8eac48818516edce1f68ae4 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Sun, 20 Nov 2016 20:04:54 +0200 Subject: [PATCH] Issue #28666: Try to fix removing readonly directories on Windows. --- Lib/test/support/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/test/support/__init__.py b/Lib/test/support/__init__.py index 22d8bd63e5..52c908e028 100644 --- a/Lib/test/support/__init__.py +++ b/Lib/test/support/__init__.py @@ -364,7 +364,7 @@ if sys.platform.startswith("win"): else: _force_run(path, os.unlink, fullname) _waitfor(_rmtree_inner, path, waitall=True) - _waitfor(os.rmdir, path) + _waitfor(lambda p: _force_run(p, os.rmdir, p), path) else: _unlink = os.unlink _rmdir = os.rmdir -- 2.50.1