Skip to content

FileNotFoundError caught - #157

Closed
leninnair wants to merge 1 commit into
pwaller:mainfrom
leninnair:fix-isvalidfont-filenotfound
Closed

FileNotFoundError caught#157
leninnair wants to merge 1 commit into
pwaller:mainfrom
leninnair:fix-isvalidfont-filenotfound

Conversation

@leninnair

Copy link
Copy Markdown

Current line182 in init.py ( f = importlib.resources.files('pyfiglet.fonts').joinpath(font).open('rb')) was causing FileNotFoundError when the function isValidFont() was called with an invalid file name. It has been caught. Also, documentation added. Test case also added.

Current line182 in __init__.py ( f = importlib.resources.files('pyfiglet.fonts').joinpath(font).open('rb')) was causing FileNotFoundError when the function isValidFont() was called with an invalid file name. It has been caught. Also, documentation added. Test case also added.
@pwaller

pwaller commented Jul 4, 2026

Copy link
Copy Markdown
Owner

Thanks for contributing. Someone sent another attempt in #161 which is slightly better prepared, so I'm likely to go with that implementation for now.

@pwaller pwaller closed this Jul 4, 2026
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.

2 participants