Skip to content

Pass file object into TTCollection and close when done#378

Merged
corranwebster merged 3 commits into
masterfrom
fix/377-resource-warning
Feb 16, 2020
Merged

Pass file object into TTCollection and close when done#378
corranwebster merged 3 commits into
masterfrom
fix/377-resource-warning

Conversation

@JCorson

@JCorson JCorson commented Dec 13, 2019

Copy link
Copy Markdown
Contributor

As of fonttools 4.1, we can use TTCollection as a context manager directly, but we are currently using 3.29 with EDM. However, we can pass an open file object directly into TTCollection rather than the file path.

Also includes a tiny refactor to remove duplicated logging error message strings.

Closes #377

@corranwebster

Copy link
Copy Markdown
Contributor

Ignoring Python 2 errors, since we're not supporting Python 2 going forward.

@corranwebster corranwebster merged commit aca9ba2 into master Feb 16, 2020
@corranwebster corranwebster deleted the fix/377-resource-warning branch February 16, 2020 08:44
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.

ResourceWarning with TTCollection

2 participants