Skip to content

Commit 5535d85

Browse files
committed
Iterates through each path from self._clean_trees to improve error handling with shutil.rmtree()
1 parent d8c7e85 commit 5535d85

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

setup.py

+6-4
Original file line numberDiff line numberDiff line change
@@ -171,10 +171,12 @@ def run(self) -> None:
171171
except OSError:
172172
pass
173173
for clean_tree in self._clean_trees:
174-
try:
175-
shutil.rmtree(clean_tree)
176-
except OSError:
177-
pass
174+
for path in clean_tree:
175+
try:
176+
# Remove the directory tree at the specified path
177+
shutil.rmtree(path)
178+
except OSError:
179+
pass
178180

179181

180182
# we need to inherit from the versioneer

0 commit comments

Comments
 (0)