From: Serhiy Storchaka Date: Sun, 20 Nov 2016 18:04:54 +0000 (+0200) Subject: Issue #28666: Fix removing readonly directories on Windows. X-Git-Tag: v3.6.0b4~40^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bbfe6c3986dc61eecd592fb3a290fce6c089c4e7;p=thirdparty%2FPython%2Fcpython.git Issue #28666: Fix removing readonly directories on Windows. --- diff --git a/Lib/test/support/__init__.py b/Lib/test/support/__init__.py index f4d80b4998c6..97828afa5a39 100644 --- a/Lib/test/support/__init__.py +++ b/Lib/test/support/__init__.py @@ -363,7 +363,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