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

Fix incorrect FileNotFoundError in load_nox_module #571

Merged
merged 2 commits into from
Feb 15, 2022
Merged

Fix incorrect FileNotFoundError in load_nox_module #571

merged 2 commits into from
Feb 15, 2022

Conversation

FollowTheProcess
Copy link
Collaborator

@FollowTheProcess FollowTheProcess commented Feb 8, 2022

Closes #566

This PR fixes the incorrect raising of FileNotFoundError when loading the nox module if it contains module-level file operations on non-existing files.

I've moved the _load_and_exec_nox_module past the FileNotFoundError and OSError exception checks and changed the exceptions it could raise into assert statements as they were all covering internal importlib exceptions that are pretty much fatal.

See conversation on issue from this comment onwards for context: #566 (comment)

@FollowTheProcess FollowTheProcess merged commit 466c576 into wntrblm:main Feb 15, 2022
@FollowTheProcess FollowTheProcess deleted the file-not-found-error branch February 15, 2022 19:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

misleading error "Failed to load Noxfile noxfile.py, no such file exists."
1 participant