Skip to content

utils.py: update file not found exception message #425

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

Merged

Conversation

granoe668
Copy link
Contributor

Previous message implies the file is found but the contents are not valid. Especially when referring to a YAML file.

This adds a clearer message and specifies where the code has looked for the file.

Example:

> ❯ infrahubctl generator --list 
.infrahub.yml: not found at /that/file/isnt/here

granoe668 added 9 commits June 3, 2025 12:54
Previous message implies the file is found but the contents are not valid. Especially when referring to a YAML file.

This adds a clearer message and specifies where the code has looked for the file.
Clearer argument name and use of path object
Downstream method changed signature:
file_name --> file_path
Fix test_missing_file after error message change
Use correct variable name
Update incorrect encoding test after read_file method changes.
@FragmentedPacket FragmentedPacket merged commit eba53ae into opsmill:stable Jun 4, 2025
16 checks passed
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.

3 participants