Skip to content
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

use context managers for open file handles #191

Closed
rabitt opened this issue Apr 30, 2016 · 0 comments
Closed

use context managers for open file handles #191

rabitt opened this issue Apr 30, 2016 · 0 comments
Milestone

Comments

@rabitt
Copy link
Contributor

rabitt commented Apr 30, 2016

In io.py load_delimited and load_ragged_delimited:

This line could leak file descriptors if there's an error anywhere below (before the call to close). Replace with with my_open(buf_or_str, 'r') as fdisc: ....

@craffel craffel added this to the 0.4 milestone Jun 1, 2016
bmcfee added a commit that referenced this issue Jul 10, 2016
@bmcfee bmcfee closed this as completed in cb786bb Jul 15, 2016
bmcfee added a commit that referenced this issue Jul 15, 2016
refactored file-or-str opening. fixes #191
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

No branches or pull requests

2 participants