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

Make failure to close a stream an error, as it would be by default. #548

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

prescod
Copy link
Contributor

@prescod prescod commented Nov 26, 2021

api.py previously had code to swallow errors closing streams (files, database connections, etc.)

This might hide errors, so I took it out.

There is a kind of output stream known as a MultiplexOutputStream that allows multiple outputs at once. I ADDED exception handling here, to ensure that we try to close all output streams. Nevertheless, once it is done it throws an exception if any failed.

A couple of tests were also updated.

@prescod prescod requested a review from a team as a code owner November 26, 2021 21:40
@prescod prescod force-pushed the feature/output-stream-cleanups branch from 312b9b8 to 8809c60 Compare November 26, 2021 22:30
@prescod prescod force-pushed the feature/output-stream-cleanups branch from 8809c60 to f60cd1c Compare November 26, 2021 23:14
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.

1 participant