Thanks to visit codestin.com
Credit goes to github.com

Skip to content

File closing #795

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

Closed
wants to merge 2 commits into from
Closed

File closing #795

wants to merge 2 commits into from

Conversation

mdboom
Copy link
Member

@mdboom mdboom commented Mar 23, 2012

This is a backport to v1.1.x of this commit

4cb2aaa

It tries to be more careful about closing open file handles to prevent file handle exhaustion on Windows.

length1 += len(data)
self.currentstream.write(data)
fontfile.close()
with open(filename, 'rb') as fontfile:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Michael, this and every other "with" statement will fail in python2.4. Since 1.1.x is out last python2.4 compatible branch, we can't have any of these.

@mdboom mdboom closed this May 14, 2012
@mdboom
Copy link
Member Author

mdboom commented May 14, 2012

Fixed by #798. Closing this.

@mdboom mdboom deleted the file-closing branch November 10, 2015 02:31
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