File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -826,8 +826,8 @@ def resetperms(path):
826
826
cls ._rmtree (path , ignore_errors = ignore_errors )
827
827
# PermissionError is raised on FreeBSD for directories
828
828
except PermissionError :
829
- # On Windows, calling _rmtree again will raise
830
- # NotADirectoryError and mask the PermissionError.
829
+ # bpo-43153: On Windows, calling _rmtree again will
830
+ # raise NotADirectoryError and mask the PermissionError.
831
831
# So we must re-raise the current PermissionError.
832
832
if _os .name == 'nt' and not _os .path .isdir (path ):
833
833
if ignore_errors :
Original file line number Diff line number Diff line change @@ -1465,7 +1465,7 @@ def test_explicit_cleanup_correct_error(self):
1465
1465
with tempfile .TemporaryDirectory () as working_dir :
1466
1466
temp_dir = self .do_create (dir = working_dir )
1467
1467
with open (os .path .join (temp_dir .name , "example.txt" ), 'wb' ):
1468
- # Used to raise NotADirectoryError on Windows.
1468
+ # Used to raise NotADirectoryError on Windows. See bpo-43153.
1469
1469
with self .assertRaises (PermissionError ):
1470
1470
temp_dir .cleanup ()
1471
1471
You can’t perform that action at this time.
0 commit comments