Skip to content
This repository was archived by the owner on Oct 29, 2024. It is now read-only.

Implemented the context manager protocol#721

Closed
JustusAdam wants to merge 1 commit into
influxdata:masterfrom
JustusAdam:master
Closed

Implemented the context manager protocol#721
JustusAdam wants to merge 1 commit into
influxdata:masterfrom
JustusAdam:master

Conversation

@JustusAdam
Copy link
Copy Markdown

Python supports so called context managers. These can be used to automatically cleanup resources, even in the case of exceptions.

This PR implements the methods necessary for the context manager protocol (__enter__ and __exit__).

@aviau
Copy link
Copy Markdown
Collaborator

aviau commented Jun 5, 2019

Okay, this is fine.

Can you write a test please?

@JustusAdam
Copy link
Copy Markdown
Author

Ah, whoops, I somehow didn't see you commented on this... Sorry for not responding, and thanks for implementing this 👍

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants