Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle FileNotFoundError and emit warning on broken symlink in scantree() #604

Closed
wants to merge 3 commits into from

Conversation

fdemmer
Copy link

@fdemmer fdemmer commented Aug 26, 2024

Fixes #605.

@fdemmer
Copy link
Author

fdemmer commented Aug 26, 2024

Excellent work pre-commit! That is a indeed broken symlink... on purpose :)

@adamchainz
Copy link
Collaborator

Why would we turn this into a warning when it's a clear sign of something being misconfigured?

@fdemmer
Copy link
Author

fdemmer commented Aug 26, 2024

Wasn't sure about that either; silent exception handling would be just fine.

@adamchainz
Copy link
Collaborator

adamchainz commented Aug 27, 2024

What I mean was, why do anything at all? A crash seems like a good thing. Broken symlinks seem like something that the user should track down and fix. Perhaps some static assets have gone missing.

I get that your server crashed but I don't think blindly ignoring the error is a good thing to do.

@adamchainz
Copy link
Collaborator

Closing per the above. I'm not convinced Whitenoise should handle this edge case.

@adamchainz adamchainz closed this Oct 28, 2024
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.

FileNotFoundError during scantree() caused by broken symlink
2 participants