Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Commit 785f90a introduced a regression by not using a context manager when opening the file, which eventually lead to a resource leak because the file handle 'f' never gets closed. This is fixed by passing the font path, instead of the open file handle, and by opening the handle using a 'with' context manager. The issue can be reproduced by running pytest with the '-W error' flag for the following minimal example: def test_file_gets_closed(): Figlet().renderText("") This will succeed now, but fails for v1.0.1.
- Loading branch information