changeset: 105229:b9e1a51a2d19 branch: 3.6 parent: 105224:82ca763882f5 parent: 105227:573fd9607c75 user: Serhiy Storchaka date: Sun Nov 20 20:36:51 2016 +0200 files: Lib/test/support/__init__.py description: Issue #28666: Fix removing readonly directories on Windows. diff -r 82ca763882f5 -r b9e1a51a2d19 Lib/test/support/__init__.py --- a/Lib/test/support/__init__.py Sun Nov 20 17:42:58 2016 +0200 +++ b/Lib/test/support/__init__.py Sun Nov 20 20:36:51 2016 +0200 @@ -364,7 +364,7 @@ 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