Skip to content

Conversation

@Jake-Carter
Copy link
Contributor

Fixes #3313

This PR catches ValueError to improve the safety of the list.remove calls, as they may attempt to remove the same file multiple times.

I think this is more acceptable than...

if a in files: files.remove(a)

... because files can be a really large list to iterate across.

@oprypin
Copy link
Contributor

oprypin commented Jul 27, 2023

Thanks. I thought it would be impossible for it to try to delete the same file twice, and anyway if there are 3 files, it should delete 2 of them rather than just catch an error from deleting 1 file twice. So I should look for a better fix but this is good for now

@oprypin oprypin merged commit 86cde7b into mkdocs:master Jul 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

v1.5.0 Attempts to Remove Files Twice, throws ValueError

2 participants