]> granicus.if.org Git - python/commitdiff
Issue #28666: Fix removing readonly directories on Windows.
authorSerhiy Storchaka <storchaka@gmail.com>
Sun, 20 Nov 2016 18:04:54 +0000 (20:04 +0200)
committerSerhiy Storchaka <storchaka@gmail.com>
Sun, 20 Nov 2016 18:04:54 +0000 (20:04 +0200)
Lib/test/support/__init__.py

index f4d80b4998c6fb478a58bfaddd5d2b6732e19771..97828afa5a39c24629a347764668a42026c83b2c 100644 (file)
@@ -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