Skip to content

Commit 46f1232

Browse files
committed
Force file mode when testing permission
Signed-off-by: Uilian Ries <uilianries@gmail.com>
1 parent 2619a22 commit 46f1232

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

tests/run_tests.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -490,11 +490,9 @@ def test_pathstrip(self):
490490

491491
def remove_tree_force(folder):
492492
for root, dirs, files in os.walk(folder):
493-
for it in dirs:
494-
chmod(os.path.join(root, it), stat.S_IWUSR | stat.S_IWGRP | stat.S_IWOTH)
495493
for it in files:
496494
chmod(os.path.join(root, it), stat.S_IWUSR | stat.S_IWGRP | stat.S_IWOTH)
497-
shutil.rmtree(folder)
495+
shutil.rmtree(folder, ignore_errors=True)
498496

499497
# ----------------------------------------------------------------------------
500498

0 commit comments

Comments
 (0)