Skip to content

Catch ValueErrors thrown when attempting to remove a file twice#3314

Merged
oprypin merged 1 commit intomkdocs:masterfrom
Jake-Carter:fix/ValueError
Jul 27, 2023
Merged

Catch ValueErrors thrown when attempting to remove a file twice#3314
oprypin merged 1 commit intomkdocs:masterfrom
Jake-Carter:fix/ValueError

Conversation

@Jake-Carter
Copy link
Copy Markdown
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

This comment was marked as abuse.

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