Skip to content

Use Context Manager to Close h5py.File After Use#146

Open
electronsandstuff wants to merge 2 commits into
ChristopherMayes:masterfrom
electronsandstuff:patch-1
Open

Use Context Manager to Close h5py.File After Use#146
electronsandstuff wants to merge 2 commits into
ChristopherMayes:masterfrom
electronsandstuff:patch-1

Conversation

@electronsandstuff

Copy link
Copy Markdown
Contributor

This PR updates ParticleGroup.write to close the h5py.File object after use with context manager. It also updates the if statement list to explicitly check for h5py.Group as one of its cases instead of assuming as default. Error is raised if invalid object provided.

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