File closing #795

Closed
wants to merge 2 commits into
from

Conversation

Projects
None yet
2 participants
@mdboom
Owner

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:

This comment has been minimized.

Show comment Hide comment
@jdh2358

jdh2358 Mar 25, 2012

Collaborator

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.

@jdh2358

jdh2358 Mar 25, 2012

Collaborator

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

This comment has been minimized.

Show comment Hide comment
@mdboom

mdboom May 14, 2012

Owner

Fixed by #798. Closing this.

Owner

mdboom commented May 14, 2012

Fixed by #798. Closing this.

@mdboom mdboom deleted the mdboom:file-closing branch Nov 10, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment