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

Change: Convert some code flows to context managers. (Supersedes #68) #94

Merged
merged 1 commit into from Apr 20, 2020

Conversation

Xaroth
Copy link
Contributor

@Xaroth Xaroth commented Apr 20, 2020

This extends on and supersedes #68 in that it replaces some open/close flows with context managers, making it slightly more resilient against exceptions and reducing the amount of file handles open.

@LordAro LordAro merged commit f71103b into OpenTTD:master Apr 20, 2020
@Xaroth Xaroth deleted the io-context-managers branch April 20, 2020 19:45
@andythenorth
Copy link
Contributor

Confirmed that this resolves the open file limit issue in macOS.

NewGRF otherwise compiles as expected.

I didn't try testing with a known-bad palette in an image, going to assume that still works :)

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.

None yet

3 participants