Skip to content

Commit 2b50aaf

Browse files
committed
Use iterdir not listdir
1 parent a9d2ce4 commit 2b50aaf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/manage/uninstall_command.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,11 +110,11 @@ def execute(cmd):
110110
cleanup(cmd, [])
111111
# Clean up other lingering directories
112112
LOGGER.info("Purging remaining files")
113-
for d in cmd.install_dir.listdir():
113+
for d in cmd.install_dir.iterdir():
114114
if d.is_dir():
115115
LOGGER.verbose("Removing %s", d)
116116
rmtree(d, after_5s_warning=warn_msg.format("remaining files"))
117-
if any(cmd.install_dir.listdir()):
117+
if any(cmd.install_dir.iterdir()):
118118
LOGGER.warn("Unable to fully remove %s.", cmd.install_dir)
119119
LOGGER.debug("END uninstall_command.execute")
120120
return

0 commit comments

Comments
 (0)